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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

medveddCommented:
What flavor of Linux you are running (Redhat, Centos, Ubuntu..)?
lphillipsAuthor Commented:
Redhat.
medveddCommented:
You need to install libgtk-java package:

yum install libgtk-java
Become a CompTIA Certified Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

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.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
medveddCommented:
Oops, libgtk-java is not enough. You also need gtk2-devel:

yum install gtk2-devel
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

medveddCommented:
Those packages will not interfere with your java, they just provide
interface between java and gtk
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.
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
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.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux OS Dev

From novice to tech pro — start learning today.