Re: Execution failure



I have this strange problem. I have gtk+-1.2.9 and gtk+2.0.0 installed, and
when I'm doing a ./configure gtk fails, but if I do a
./configure --disable-gtktest and compile, everything works OK. But, when I'm
executing the program I get;

src/gtk-gnutella: error while loading shared libraries: cannot open shared object file: cannot load shared 
object file: No such file or directory

Which libraries is it missing? Where has they gone? Where can I get them?
I did follow the installation instructions from beginning to the end.
But, do I have to have something else?

1) The very first thing you should 
do is to run ldd on your app:

your_prompt> ldd src/gtk-gnutella

This will give you a list of all the libraries
and their paths, that the dynamic linker is actually 
going to use (to load, if they are not yet in memory) 
to run your app. If it doesn't find your library,
then you will have a message saying so instead of
the path. Of course ldd will complain if you try
it in a program that was compiled statically.

2) To run a program, the libraries must be
seen at: i) compile time (-I/path);
ii) link time (-L/path) and iii) run time.
I think you are at stage iii):
The -I and -L directives will not help
finding the libraries to run your program

3) The usual ways to make your libs
visible to the dynamic linker are:
i) update your LD_LIBRARY_PATH in
your .bash_profile (this is good
if you are the only one using
that lib and you want to update
versions too often, so you don't
need to be root to do this)
ii) add the path of your library
to /etc/ls.so.conf,
perhaps comment old libraries,
and then run /sbin/ldconfig
(this makes the library visible
to every user in this computer)

iii) make symbolic links
from /usr/lib or /usr/local/lib
to the real libs, where they actually are.

A combination of all these techniques and some 
black magic should sort out your problem.

Carlos



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]