# Problem installing wxruby on linux

**URL:** <https://www.ruby-forum.com/t/problem-installing-wxruby-on-linux/177374>\
**Category:** wxRuby\
**Created:** [October 15, 2009, 10:53pm UTC](https://www.ruby-forum.com/t/problem-installing-wxruby-on-linux/177374 "2009-10-15T22:53:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![haris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/ccd318/32.png) [@haris](https://www.ruby-forum.com/u/haris)\
**Post date:** [October 15, 2009, 10:53pm UTC](https://www.ruby-forum.com/t/problem-installing-wxruby-on-linux/177374/1 "2009-10-15T22:53:58Z")

</div>

Hi.

I installed wxruby with ‘gem install wxruby’ and everything went ok.  
Then I installed wxwidgets (wx2.8) and wx-common.  
I run irb and write:  
require ‘rubygems’  
require ‘wx’  
and get the following error:

#-----------------  
LoadError: libwx\_gtk2u\_stc-2.8.so.0: cannot open shared object file: No  
such file or directory -  
/home/haris/.gem/ruby/1.8/gems/wxruby-2.0.1-x86-linux/lib/wxruby2.so

from  
/home/haris/.gem/ruby/1.8/gems/wxruby-2.0.1-x86-linux/lib/wxruby2.so  
from /usr/lib/ruby/1.8/rubygems/custom\_require.rb:31:in `require' from /home/haris/.gem/ruby/1.8/gems/wxruby-2.0.1-x86-linux/lib/wx.rb:12 from /usr/lib/ruby/1.8/rubygems/custom_require.rb:36:in`gem\_original\_require’  
from /usr/lib/ruby/1.8/rubygems/custom\_require.rb:36:in `require’  
from (irb):3  
from /usr/lib/ruby/1.8/rubygems/requirement.rb:22  
#--------------------

wxruby2.so is present in  
/home/haris/.gem/ruby/1.8/gems/wxruby-2.0.1-x86-linux/lib/ directory  
along with wx.rb

Why am I getting this error ?

Thanks.  
Haris.

---

<div class="post-metadata">

**Author:** ![haris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/ccd318/32.png) [@haris](https://www.ruby-forum.com/u/haris)\
**Post date:** [October 16, 2009, 1:11am UTC](https://www.ruby-forum.com/t/problem-installing-wxruby-on-linux/177374/2 "2009-10-16T01:11:02Z")

</div>

Haris,  
I had the same problem.  
What flavor of linux are you running? If it is Fedora release 11 or  
newer,  
you need to

1. Downgrade SWIG to version 1.3.38 (1.3.39 or greater will not work)
2. make sure you have the devlopment rpm installed for wx
3. build wxruby from source then you can create a gem that will work  
with  
your machine

Thanks,

* * *

Allan D.  
Member of NetBeans Dream Team  
[http://wiki.netbeans.org/NetBeansDreamTeam](http://wiki.netbeans.org/NetBeansDreamTeam)  
Lead Developer, nbPython  
[http://wiki.netbeans.org/Python](http://wiki.netbeans.org/Python)  
[http://codesnakes.blogspot.com](http://codesnakes.blogspot.com) (my blog)  
Co-Chair, CajunJUG  
[http://www.cajunjug.org](http://www.cajunjug.org)

---

<div class="post-metadata">

**Author:** ![haris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/ccd318/32.png) [@haris](https://www.ruby-forum.com/u/haris)\
**Post date:** [October 27, 2009, 2:05pm UTC](https://www.ruby-forum.com/t/problem-installing-wxruby-on-linux/177374/3 "2009-10-27T14:05:39Z")

</div>

Haris B. wrote:

> /home/haris/.gem/ruby/1.8/gems/wxruby-2.0.1-x86-linux/lib/wxruby2.so

It seems you do not have at least part of the wx-widgets libraries  
installed. Check in your package manager to make sure you have  
wx-widgets-2.8 and (after this message) wx-widgets-stc-2.8 installed.

On Linux, the gem only installs the ruby interface to the wxWidgets  
library, not the core wxWidgets library code itself.

a
