# ERROR - libwx\_gtk2u\_media-2.8.so.0: cannot open shared object file

**URL:** <https://www.ruby-forum.com/t/error-libwx-gtk2u-media-2-8-so-0-cannot-open-shared-object-file/213313>\
**Category:** wxRuby\
**Created:** [October 30, 2011, 3:22am UTC](https://www.ruby-forum.com/t/error-libwx-gtk2u-media-2-8-so-0-cannot-open-shared-object-file/213313 "2011-10-30T03:22:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [October 30, 2011, 3:22am UTC](https://www.ruby-forum.com/t/error-libwx-gtk2u-media-2-8-so-0-cannot-open-shared-object-file/213313/1 "2011-10-30T03:22:04Z")

</div>

Hi all,

I’ve been working with wxruby for a while with an Ubuntu 10.04  
environment  
mounted with VMWare over Windows.

Now, I’m trying to set it up in a new environment. It’s Ubuntu 11.04,  
using  
RVM with both ruby 1.8.7 and 1.9.2 installed.

I installed wxruby and wxruby-ruby19 accordingly within corresponding  
gemsets.

Now, when I try to launch an app that works in my old environment I’m  
getting this error…

_\>…/custom\_require.rb:36:in `require’: libwx\_gtk2u\_media-2.8.so.0:  
cannot  
open shared object file_

I tried installing the libraries related to wxGTK but they were already  
installed and updated…

$sudo apt-get install libwxgtk2.8-dev

> libwxgtk2.8-dev is already the newest version.  
> $sudo apt-get install libwxgtk2.8-0  
> libwxgtk2.8-0 is already the newest version.

How can I solve this?

I don’t know if it helps but I installed both wxruby versions using ‘gem  
install’ command…

Thanks in advance,  
Alex

_ALEJANDRO RIEDEL_\*  
\*  
\*LinkedIn [http://ar.linkedin.com/pub/alejandro-riedel/13/5a7/356](http://ar.linkedin.com/pub/alejandro-riedel/13/5a7/356) -  
github[https://github.com/alejandroriedel](https://github.com/alejandroriedel)

- Blog [http://alejandroriedel.blogspot.com](http://alejandroriedel.blogspot.com) -  
twitter[http://twitter.com/alejandroriedel](http://twitter.com/alejandroriedel)

-

---

<div class="post-metadata">

**Author:** ![Alejandro\_Riedel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/dc4da7/32.png) [@Alejandro\_Riedel](https://www.ruby-forum.com/u/Alejandro_Riedel)\
**Post date:** [October 30, 2011, 10:33am UTC](https://www.ruby-forum.com/t/error-libwx-gtk2u-media-2-8-so-0-cannot-open-shared-object-file/213313/2 "2011-10-30T10:33:05Z")

</div>

Am 30.10.2011 03:06, schrieb Alejandro Riedel:

> Hi all,

Hi Alejandro,

> Now, I’m trying to set it up in a new environment. It’s Ubuntu 11.04,  
> using RVM with both ruby 1.8.7 and 1.9.2 installed.

> Now, when I try to launch an app that works in my old environment I’m  
> getting this error…
> 
> /\>…/custom\_require.rb:36:in `require’: libwx\_gtk2u\_media-2.8.so.0:  
> cannot open shared object file/

It’s a known problem with Ubuntu Maverick and Natty. They removed the  
media library you’re missing from wxWidgets – and there’s no way to  
install it separately besides compiling wxWidgets yourself. See this  
bug, which is fixed in Ubuntu Oneiric:

> **[Bug #632984 “libwx\_gtk2u\_media-2.8.so.0 missing from libwxgtk2.8...” : Bugs :...](https://bugs.launchpad.net/ubuntu/+source/wxwidgets2.8/+bug/632984)**
>
> Binary package hint: libwxgtk2.8-0
> 
> Ubuntu 10.10 Maverick, 11.04 Natty
> libwxgtk2.8-0 2.8.11.0-0ubuntu4
> This library should be packaged as well as part of the standard wxwidgets installation as is the case in previous versions of...

And don’t try to compile wxWidgets yourself, you’ll run straight into a  
bug in pixman which causes wxRuby to crash:

> **[Bug #756237 “wxRuby crashes with segmentation fault in pixman\_im...” : Bugs :...](https://bugs.launchpad.net/ubuntu/+source/pixman/+bug/756237)**
>
> Edited: I corrected the repro steps, thanks Marvin
> 
> This is a strange one, I'm not sure exactly where the fault lies. Basically, performing almost any operation in a wxRuby app causes a crash in pixman\_image\_composite32. This crash doesn't occur when...

> I tried installing the libraries related towxGTK but they were already  
> installed and updated…
> 
> $sudo apt-get install libwxgtk2.8-dev
> 
> > libwxgtk2.8-dev is already the newest version.  
> > $sudo apt-get install libwxgtk2.8-0  
> > libwxgtk2.8-0 is already the newest version.
> 
> How can I solve this?

Upgrade to Oneiric and hope both bugs are gone. As the first one is  
officially marked as “fixed” it should be; the second one _may_ be,  
because on my Arch Linux system, which uses pixman 0.22.2, that bug is  
gone as well. But I don’t know wheather that pixman made it into Ubuntu  
Oneiric or if the version was published after the feature freeze.

Finally, there has been a lengthy discussion along wxRuby devs and users  
here: [Packaging wxRuby fails - wxRuby - Ruby-Forum](http://www.ruby-forum.com/topic/1246679)

Vale,  
Marvin
