1LDCONFIG(8)                Linux Programmer's Manual               LDCONFIG(8)
2
3
4

NAME

6       ldconfig - configure dynamic linker run-time bindings
7

SYNOPSIS

9       /sbin/ldconfig [-nNvXV] [-f conf] [-C cache] [-r root] directory...
10       /sbin/ldconfig -l [-v] library...
11       /sbin/ldconfig -p
12

DESCRIPTION

14       ldconfig  creates  the  necessary  links  and  cache to the most recent
15       shared libraries found in the  directories  specified  on  the  command
16       line, in the file /etc/ld.so.conf, and in the trusted directories, /lib
17       and /usr/lib (on some 64-bit architectures such  as  x86-64,  /lib  and
18       /usr/lib are the trusted directories for 32-bit libraries, while /lib64
19       and /usr/lib64 are used for 64-bit libraries).
20
21       The cache is used by the run-time linker, ld.so or ld-linux.so.  ldcon‐
22       fig checks the header and filenames of the libraries it encounters when
23       determining which versions should have their links updated.
24
25       ldconfig will attempt to deduce the type of ELF libraries (i.e.,  libc5
26       or  libc6/glibc)  based  on  what  C libraries, if any, the library was
27       linked against.
28
29       Some existing libraries do not contain enough information to allow  the
30       deduction  of  their  type.  Therefore, the /etc/ld.so.conf file format
31       allows the specification of an expected type.  This is  used  only  for
32       those  ELF  libraries  which  we  can  not  work  out.   The  format is
33       "dirname=TYPE", where TYPE can be libc4, libc5, or libc6.  (This syntax
34       also works on the command line.)  Spaces are not allowed.  Also see the
35       -p option.  ldconfig should normally be run by the superuser as it  may
36       require write permission on some root owned directories and files.
37
38       Note that ldconfig will only look at files that are named lib*.so* (for
39       regular shared objects) or ld-*.so* (for the  dynamic  loader  itself).
40       Other  files will be ignored.  Also, ldconfig expects a certain pattern
41       to how the symlinks are set up, like this  example,  where  the  middle
42       file (libfoo.so.1 here) is the SONAME for the library:
43
44           libfoo.so -> libfoo.so.1 -> libfoo.so.1.12
45
46       Failure to follow this pattern may result in compatibility issues after
47       an upgrade.
48

OPTIONS

50       -c fmt, --format=fmt
51              (Since glibc 2.2) Cache format to  use:  old,  new,  or  compat.
52              Since  glibc 2.32, the default is new.  Before that, it was com‐
53              pat.
54
55       -C cache
56              Use cache instead of /etc/ld.so.cache.
57
58       -f conf
59              Use conf instead of /etc/ld.so.conf.
60
61       -i, --ignore-aux-cache
62              (Since glibc 2.7) Ignore auxiliary cache file.
63
64       -l     (Since glibc 2.2) Library mode.  Manually  link  individual  li‐
65              braries.  Intended for use by experts only.
66
67       -n     Process  only  the  directories  specified  on the command line.
68              Don't process the trusted directories, nor  those  specified  in
69              /etc/ld.so.conf.  Implies -N.
70
71       -N     Don't rebuild the cache.  Unless -X is also specified, links are
72              still updated.
73
74       -p, --print-cache
75              Print the lists of directories and candidate libraries stored in
76              the current cache.
77
78       -r root
79              Change to and use root as the root directory.
80
81       -v, --verbose
82              Verbose  mode.   Print  current version number, the name of each
83              directory as it is scanned, and  any  links  that  are  created.
84              Overrides quiet mode.
85
86       -V, --version
87              Print program version.
88
89       -X     Don't  update  links.  Unless -N is also specified, the cache is
90              still rebuilt.
91

FILES

93       /lib/ld.so
94              Run-time linker/loader.
95       /etc/ld.so.conf
96              File containing a list of directories, one per line, in which to
97              search for libraries.
98       /etc/ld.so.cache
99              File containing an ordered list of libraries found in the direc‐
100              tories specified in /etc/ld.so.conf, as well as those  found  in
101              the trusted directories.
102

SEE ALSO

104       ldd(1), ld.so(8)
105

COLOPHON

107       This  page  is  part of release 5.13 of the Linux man-pages project.  A
108       description of the project, information about reporting bugs,  and  the
109       latest     version     of     this    page,    can    be    found    at
110       https://www.kernel.org/doc/man-pages/.
111
112
113
114GNU                               2021-03-22                       LDCONFIG(8)
Impressum