LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   What is ldconfig? (https://www.linuxquestions.org/questions/linux-software-2/what-is-ldconfig-369493/)

MicahCarrick 10-03-2005 05:32 PM

What is ldconfig?
 
I had a program which wasn't working because it was looking for the so files in /usr/lib but when I looked at /etc/ld.so.conf it had /usr/local/lib in there already. So I ran /sbin/ldconfig and the program worked.

What is ldconfig, and why didn't this work initially? Shouldn't this be established when the computer starts?

jailbait 10-03-2005 06:27 PM

"I had a program which wasn't working because it was looking for the so files in /usr/lib but when I looked at /etc/ld.so.conf it had /usr/local/lib in there already. So I ran /sbin/ldconfig and the program worked."

/etc/ld.so.conf is the library where you set up the list of libraries to be included in the dynamic link libraries. But /etc/ld.so.conf is not the list that the kernel actually uses for a dynamic link library list. The kernel uses /etc/ld.so.cache. ldconfig is the program which takes /etc/ld.so.conf and builds /etc/ld.so.cache.

"What is ldconfig, and why didn't this work initially? Shouldn't this be established when the computer starts?"

You were probably in the situation that /usr/local/lib was in /etc/ld.so.conf but was not in /etc/ld.so.cache until after you ran ldconfig.

---------------------
Steve Stites

MicahCarrick 10-03-2005 06:31 PM

Thanks! :)


All times are GMT -5. The time now is 10:27 PM.