1 .\" Copyright 1999 SuSE GmbH Nuernberg, Germany
2 .\" Author: Thorsten Kukuk <kukuk@suse.de>
4 .\" %%%LICENSE_START(GPLv2+_SW_3_PARA)
5 .\" This program is free software; you can redistribute it and/or
6 .\" modify it under the terms of the GNU General Public License as
7 .\" published by the Free Software Foundation; either version 2 of the
8 .\" License, or (at your option) any later version.
10 .\" This program is distributed in the hope that it will be useful,
11 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
12 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 .\" General Public License for more details.
15 .\" You should have received a copy of the GNU General Public
16 .\" License along with this manual; if not, see
17 .\" <http://www.gnu.org/licenses/>.
20 .\" Modified, 6 May 2002, Michael Kerrisk, <mtk.manpages@gmail.com>
21 .\" Change listed order of /usr/lib and /lib
22 .TH LDCONFIG 8 2021-03-22 "GNU" "Linux Programmer's Manual"
24 ldconfig \- configure dynamic linker run-time bindings
26 .BR /sbin/ldconfig " [" \-nNvXV "] [" \-f " \fIconf\fP] [" \-C " \fIcache\fP] [" \-r " \fIroot\fP]"
42 creates the necessary links and cache to the most recent shared
43 libraries found in the directories specified on the command line,
46 and in the trusted directories,
50 (on some 64-bit architectures such as x86-64,
54 are the trusted directories for 32-bit libraries, while
58 are used for 64-bit libraries).
60 The cache is used by the run-time linker,
65 checks the header and filenames of the libraries it encounters when
66 determining which versions should have their links updated.
69 will attempt to deduce the type of ELF libraries (i.e., libc5 or libc6/glibc)
70 based on what C libraries, if any, the library was linked against.
71 .\" The following sentence looks suspect
72 .\" (perhaps historical cruft) -- MTK, Jul 2005
73 .\" Therefore, when making dynamic libraries,
74 .\" it is wise to explicitly link against libc (use \-lc).
76 Some existing libraries do not contain enough information
77 to allow the deduction of their type.
80 file format allows the specification of an expected type.
83 for those ELF libraries which we can not work out.
85 is "dirname=TYPE", where TYPE can be libc4, libc5, or libc6.
86 (This syntax also works on the command line.)
94 should normally be run by the superuser as it may require write
95 permission on some root owned directories and files.
99 will only look at files that are named
101 (for regular shared objects) or
103 (for the dynamic loader itself).
104 Other files will be ignored.
107 expects a certain pattern to how the symlinks are set up, like this
108 example, where the middle file
110 here) is the SONAME for the library:
114 libfoo.so \-> libfoo.so.1 \-> libfoo.so.1.12
118 Failure to follow this pattern may result in compatibility issues
122 .BR \-c " \fIfmt\fP, " \-\-format=\fIfmt\fP
129 Since glibc 2.32, the default is
131 .\" commit cad64f778aced84efdaa04ae64f8737b86f063ab
139 .IR /etc/ld.so.cache .
145 .IR /etc/ld.so.conf .
146 .\" FIXME glibc 2.7 added -i
148 .BR \-i ", " \-\-ignore\-aux\-cache
150 .\" commit 27d9ffda17df4d2388687afd12897774fde39bcc
151 Ignore auxiliary cache file.
156 Manually link individual libraries.
157 Intended for use by experts only.
160 Process only the directories specified on the command line.
161 Don't process the trusted directories,
162 nor those specified in
163 .IR /etc/ld.so.conf .
168 Don't rebuild the cache.
171 is also specified, links are still updated.
173 .BR \-p ", " \-\-print\-cache
174 Print the lists of directories and candidate libraries stored in
180 as the root directory.
182 .BR \-v ", " \-\-verbose
184 Print current version number, the name of each directory as it
185 is scanned, and any links that are created.
186 Overrides quiet mode.
188 .BR \-V ", " \-\-version
189 Print program version.
195 is also specified, the cache is still rebuilt.
197 .\" FIXME Since glibc-2.3.4, "include" directives are supported in ld.so.conf
199 .\" FIXME Since glibc-2.4, "hwcap" directives are supported in ld.so.conf
203 Run-time linker/loader.
206 File containing a list of directories, one per line,
207 in which to search for libraries.
210 File containing an ordered list of libraries found in the directories
212 .IR /etc/ld.so.conf ,
213 as well as those found in the trusted directories.