Linux.com

Misuse of LD_LIBRARY_PATH

Posted by: Anonymous Coward on February 20, 2007 04:09 AM
Normally the dynamic linker will use<nobr> <wbr></nobr>/etc/ld.so.cache to find out where libraries are rather than trying each possible path in turn. By setting LD_LIBRARY_PATH you invalidate this cache and force it to search through that and the system path (defined in<nobr> <wbr></nobr>/etc/ld.so.conf). Instead of setting it on a routine basis you should add the extra library directories to<nobr> <wbr></nobr>/etc/ld.so.conf (or under<nobr> <wbr></nobr>/etc/ld.so.conf.d if your distribution supports that).

#

Return to CLI Magic: Linux troubleshooting tools 101