random technical thoughts from the Nominet technical team

Default Library Path

1 Star2 Stars3 Stars4 Stars5 Stars (3 votes, average: 4 out of 5)
Loading ... Loading ...
Posted by jason on Feb 21st, 2006

You are all readily familiar with the standard LD_LIBRARY_PATH for defining where an executable can find the libraries it requires to run. You can in addition to this define a default set of paths that all applications will search, this can save configuration problems. The standard paths to search is defined in the file /etc/ld.so.conf . This often just points to a directory under which several other configuration files are located. Each configuration file contains a list of paths for the dynamic linker/loader to search for libraries.

The dynamic linker/loader, ld.so or ld-linux.so is the program that finds shared libraries needed by the program you are running, and then run the actual program, that is assuming static libraries are not being used. The dynamic loader actually uses the file /etc/ld.so.cache which contains a compiled list of candidate libraries. The cache file is generated from the ld.so.conf file using ldconfig , which you must run to update the cache file.

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.

Recent Posts

Highest Rated

Categories

Archives

Meta: