Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

share|improve this question
add comment

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.

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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