Getting "libgtk-x11-2.0.so.0: cannot open shared object file" on Linux

I'm getting the following error when trying to run an application on Linux version 2.6.18-164.el5.

(libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory)

After a lot of googling it seems to be more about linux vs. the actual program I'm trying to run, as a lot of people are getting this with many different applications.  I have confirmed the files it is looking for (listed below in full error) are there, and permissions allow access to them.

Does anyone have any idea what I need to do to resolve this?

FULL ERROR
[wsadmin@rnd1aasr01:/tmp/sibexplorer_1.01b]:> ./sibexplorer.sh
Service Integration Bus Explorer Version: 1.01b
(C) Copyright IBM Corp. 2006
Exception in thread "main" java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
        swt-pi-gtk-3655 (libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory)
        swt-pi-gtk (Not found in java.library.path)
        /tmp/swtlib-32/libswt-pi-gtk-3655.so (libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory)
        /tmp/swtlib-32/libswt-pi-gtk.so (/tmp/swtlib-32/liblibswt-pi-gtk.so.so: cannot open shared object file: No such file or directory)

        at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
        at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
        at org.eclipse.swt.internal.gtk.OS.<clinit>(Unknown Source)
        at java.lang.J9VMInternals.initializeImpl(Native Method)
        at java.lang.J9VMInternals.initialize(J9VMInternals.java:200)
        at org.eclipse.swt.internal.Converter.wcsToMbcs(Unknown Source)
        at org.eclipse.swt.internal.Converter.wcsToMbcs(Unknown Source)
        at org.eclipse.swt.widgets.Display.<clinit>(Unknown Source)
        at java.lang.J9VMInternals.initializeImpl(Native Method)
        at java.lang.J9VMInternals.initialize(J9VMInternals.java:200)
        at com.ibm.ws.sib.tools.explorer.SIBExplorer.go(SIBExplorer.java:192)
        at com.ibm.ws.sib.tools.explorer.SIBExplorer.main(SIBExplorer.java:87)
lphillipsAsked:
Who is Participating?
 
upanwarCommented:
I have seen that you are using the RHEL 5 or its clone so you can know the package which containes the the library file by executing the below given command and then install that package to fix your issue.

# rpm -q --redhatprovides libgtk-x11-2.0.so.0

you need rpmdb-redhat package to be installed on your system to use this option.
0
 
medveddCommented:
What flavor of Linux you are running (Redhat, Centos, Ubuntu..)?
0
 
lphillipsAuthor Commented:
Redhat.
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
medveddCommented:
You need to install libgtk-java package:

yum install libgtk-java
0
 
medveddCommented:
Oops, libgtk-java is not enough. You also need gtk2-devel:

yum install gtk2-devel
0
 
lphillipsAuthor Commented:
Medvedd -
Do I need those packages you mentioned if I'm using the Java delivered with WebSphere?  The application has a env.sh which ask for the WebSphere directory, so it can locate the Java it wants to use.

Upanwa -
I get the following error when I run that command, but I am not root so I don't know if that has something to do with it.  I have asked the unix admins to run it and see if they get a different output.  Here is what I got:

[wsadmin@rnd1aasr01:/home/wsadmin]:> rpm -q --redhatprovides libgtk-x11-2.0.so.0
error: cannot open Packages index using db3 - No such file or directory (2)
error: cannot open Packages database in /usr/lib/rpmdb/x86_64-redhat-linux/redhat
no package provides libgtk-x11-2.0.so.0

0
 
medveddCommented:
Those packages will not interfere with your java, they just provide
interface between java and gtk
0
 
lphillipsAuthor Commented:
I am going to get the unix admin to help me get the lib and packages installed and will update this thread then.  Hopefully that will happen in the next couple of hours.  I will keep you posted.
0
 
Duncan RoeSoftware DeveloperCommented:
The following files need to exist on your system:
07:31:41$ ls -Fl /usr/lib/libgtk-x11*
-rw-r--r-- 1 root root     956 Apr 30  2010 /usr/lib/libgtk-x11-2.0.la
lrwxrwxrwx 1 root root      26 Jul 25  2010 /usr/lib/libgtk-x11-2.0.so -> libgtk-x11-2.0.so.0.1800.9*
lrwxrwxrwx 1 root root      26 Jul 25  2010 /usr/lib/libgtk-x11-2.0.so.0 -> libgtk-x11-2.0.so.0.1800.9*
-rwxr-xr-x 1 root root 3855924 Apr 30  2010 /usr/lib/libgtk-x11-2.0.so.0.1800.9*

Open in new window

If the files are not present, you should contact your Linux sysadmins to get them installed. The package will have a name starting with or containing gtk+2-2
0
 
lphillipsAuthor Commented:
I ended up needing both packages/libraries that were suggested by you two.  I'm still having an issue, but it appears to be my xwindows client (although xclock works).  Because the unix admin tried it as my user from his machine and it worked.

Thanks you for your help.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.