TOC   Previous   Next

ldconfig(8)

ldconfig(8) addresses two potential problems with shared libraries:

  1. Speed: Shared libraries can reside in many different directories: it could take the dynamic linker a long time to search them.

  2. Manually keeping sonames symlinks up to date is error-prone as new versions of libraries are installed, or old versions are removed.

ldconfig solves these problems by:

  1. Creating a cache file:
    ldconfig searches for latest major library versions in:

    • all of the directories specified in /etc/ld.so.conf
    • /lib
    • /usr/lib

    and updates a cache file, /etc/ld.so.cache, to contain a list of the latest major library versions, and their locations.
    Cache file is used by dynamic linker at run-time when resolving library names.

  2. Automating the creation of sonames:

In order to work properly, ldconfig relies on the use of the standard naming convention for shared libraries (i.e., libname.maj.min)

(C) 2006, Michael Kerrisk