What can you do when your linux system "can't find" dynamically linked libraries that are indeed installed in their correct locations?

Case in point, I'm trying to run a program called 'ucanvcam':

oliver@human ~/installed/ucanvcam-0.1.6/bin $ ./ucanvcam
./ucanvcam: error while loading shared libraries: libgd.so.2: cannot open shared object file: No such file or directory

oliver@human ~/installed/ucanvcam-0.1.6/bin $ locate libgd.so.2
/usr/lib64/libgd.so.2.0.0
/usr/lib64/libgd.so.2

oliver@human ~/installed/ucanvcam-0.1.6/bin $ ldd ./ucanvcam
    linux-gate.so.1 =>  (0xf7706000)
    [...]
    libgd.so.2 => not found
    [...]
    librt.so.1 => /lib32/librt.so.1 (0xf6b1e000)

How can I tell it to look for libgd.so.2 in /usr/lib64? And more importantly, why isn't it looking there, and where is it looking?

Thanks,
Mala

link|improve this question

feedback

1 Answer

up vote 1 down vote accepted

The manual page for ld.so will help you with this. In particular the important things to look at are probably the contents of your shell variable LD_LIBRARY_PATH and the file /etc/ld.so.conf.

link|improve this answer
Thank you, setting my LD_LIBRARY_PATH variable worked a charm :) – Mala Apr 28 '10 at 21:33
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.