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.

I have just downloaded, configure'd, make'd and make install'ed the Google Log Library to my computer. It built all required files (as far as I can see) and copied the .so file (libglog.so.0.0.0) to /usr/local/lib. Then it created two symbolic links called "libglog.so.0" and "libglog.so" that point to that shared object file:

lrwxrwxrwx 1     16 /usr/local/lib/libglog.so -> libglog.so.0.0.0
lrwxrwxrwx 1     16 /usr/local/lib/libglog.so.0 -> libglog.so.0.0.0
-rwxr-xr-x 1 498381 /usr/local/lib/libglog.so.0.0.0

Now I'm trying to execute a program that uses the library, but when I start it, I get the error message that it can't open the so-file:

cloud:/home/blam/redirector/redirector2# ./redirector
./redirector: error while loading shared libraries: libglog.so.0: cannot open shared object file: No such file or directory

/usr/local/lib is included in my /etc/ld.so.conf file, and another library that's located in this directory is loaded correctly.

What am I doing wrong here? What am I missing?

share|improve this question
    
Just found out that setting LD_LIBRARY_PATH to /usr/local/lib fixes the problem - but still: why is it not working without that tweak? –  BlaM Aug 4 '10 at 10:57
1  
What does ldd /home/blam/redirector/redirector2/redirector return? –  Janne Pikkarainen Aug 4 '10 at 10:59
    
Now it returns the correct library, but good to know that that command (ldd) exists! –  BlaM Aug 4 '10 at 14:51

1 Answer 1

up vote 4 down vote accepted

Okay, fixed it myself. I had to call ldconfig manually.

Looks as if some tool modified the ld.so.conf, but did not update the database.

share|improve this answer
3  
Actually, you need to re-run ldconfi every time some library changes, not just when chanching ld.so.conf. So it's normal you had to run it. –  sleske Aug 4 '10 at 11:08
    
Okay, good to know. –  BlaM Aug 4 '10 at 11:10

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.