LDCONFIG(8) BSD System Manager's Manual LDCONFIG(8)NAMEldconfig - compile a table of dynamically linked shared libraries
SYNOPSISldconfig [-DvnNX] [-C cache] [-f conf] [-r root] [directory ...]
ldconfig-l [-Dv] library ...
ldconfig-p
DESCRIPTION
The ldconfig utility creates and maintains the file /etc/ld.so.cache,
which the dynamic linker ld.so(8) uses to map symbolic library names into
library pathnames. Ldconfig also looks for the most up-to-date version
in a set of libraries with version suffixes and creates a symlink from
that version to the generic library name.
Ldconfig processes the shared libraries that it finds in each directory
in its argument list, if any are given, followed by each directory listed
in the file /etc/ld.so.conf. Directory names in /etc/ld.so.conf may be
separated by colons, whitespace, commas or newlines.
If one or more libraries has a version suffix, ldconfig uses the built-in
library name (see ld.so(8)) to figure out which libraries are really the
same. It then compares the filenames to choose the most up-to-date ver-
sion. Strings of numbers in the version suffix are compared numerically,
while non-numeric strings are compared in ASCII collating order. The
comparison works from left to right. A version suffix like .2.9 would
thus be interpreted as a major version number 2 followed by a minor ver-
sion number 9; if another version of the library has a version suffix
.2.10, ldconfig will choose the latter one.
Ldconfig updates the database file /etc/ld.so.cache to record the library
name with the pathname of the up-to-date version of the library. If the
file named by the built-in library name for a library does not exist or
is a symbolic link, ldconfig creates a symbolic link from the most up-to-
date version of the library to that filename.
Ldconfig should normally be run by the super-user, as it may require
write permission on some root owned directories and files. You should
run it whenever you install new shared libraries.
The following options are supported:
-D Debug mode. Implies -N and -X.
-v Verbose mode. Print the current version number, the name of
each directory as it is scanned and any links that are creat-
ed.
-n Only process directories specified on the command line. Don't
process /etc/ld.so.conf. Implies -N.
-N Don't rebuild the cache. Unless -X is also specified, links
are still updated.
-X Don't update links. Unless -N is also specified, the cache is
still rebuilt.
-f conf Use conf instead of /etc/ld.so.conf.
-C cache Use cache instead of /etc/ld.so.cache.
-r root Change to and use root as the root directory.
-l Library mode. Manually link individual libraries. Intended
for use by experts only.
-p Print the lists of directories and candidate libraries stored
in the current cache.
EXAMPLES
The command
ldconfig-v
will set up the correct links for the shared libraries and rebuild the
cache, printing information about each action as it is taken.
The command
ldconfig-n /shlib
executed as root after the installation of a new shared library, will
properly update the shared library symbolic links in /shlib.
FILES
/shlib/ld-bsdi.so dynamic linker/loader
/etc/ld.so.conf search path for shared libraries
/etc/ld.so.cache database that maps library names to pathnames
SEE ALSOld.so(8)BUGS
Ldconfig, being a user process, must be run manually and has no means of
dynamically determining and relinking shared libraries for use by
ld.so(8) when a new shared library is installed.
AUTHORS
David Engel and Mitch D'Souza. This manual page has been updated for
BSD/OS from the original Linux version.
BSDI BSD/OS February 11, 1998 2