share/mk/: build-html: Don't build mbind.2 and set_mempolicy.2
[man-pages.git] / man8 / ldconfig.8
blobf9211caf8d2ab93d148fbe2f4736d2c8649eee5a
1 .\" Copyright 1999 SuSE GmbH Nuernberg, Germany
2 .\" Author: Thorsten Kukuk <kukuk@suse.de>
3 .\"
4 .\" SPDX-License-Identifier: GPL-2.0-or-later
5 .\"
6 .\" Modified, 6 May 2002, Michael Kerrisk, <mtk.manpages@gmail.com>
7 .\"   Change listed order of /usr/lib and /lib
8 .TH ldconfig 8 (date) "Linux man-pages (unreleased)"
9 .SH NAME
10 ldconfig \- configure dynamic linker run-time bindings
11 .SH SYNOPSIS
12 .SY /sbin/ldconfig
13 .\" TODO?: -c, --format, -i, --ignore-aux-cache, --print-cache,
14 .\" --verbose, -V, --version, -?, --help, --usage
15 .RB [ \-nNvVX ]
16 .RB [ \-C\~\c
17 .IR cache ]
18 .RB [ \-f\~\c
19 .IR conf ]
20 .RB [ \-r\~\c
21 .IR root ]
22 .IR directory \~.\|.\|.
23 .YS
24 .SY /sbin/ldconfig
25 .B \-l
26 .RB [ \-v ]
27 .IR library \~.\|.\|.
28 .YS
29 .SY /sbin/ldconfig
30 .B \-p
31 .YS
32 .SH DESCRIPTION
33 .B \%ldconfig
34 creates the necessary links and cache to the most recent shared
35 libraries found in the directories specified on the command line,
36 in the file
37 .IR /etc/ld.so.conf ,
38 and in the trusted directories,
39 .I /lib
40 and
41 .IR /usr/lib .
42 On some 64-bit architectures such as x86-64,
43 .I /lib
44 and
45 .I /usr/lib
46 are the trusted directories for 32-bit libraries,
47 while
48 .I /lib64
49 and
50 .I /usr/lib64
51 are used for 64-bit libraries.
53 The cache is used by the run-time linker,
54 .I ld.so
56 .IR ld\-linux.so .
57 .B \%ldconfig
58 checks the header and filenames of the libraries it encounters when
59 determining which versions should have their links updated.
60 .\" Support for libc4 and libc5 dropped in
61 .\" 8ee878592c4a642937152c8308b8faef86bcfc40 (2022-07-14) as "obsolete
62 .\" for over twenty years".
63 .B \%ldconfig
64 should normally be run by the superuser as it may require write
65 permission on some root owned directories and files.
67 .B \%ldconfig
68 will look only at files that are named
69 .I lib*.so*
70 (for regular shared objects) or
71 .I ld\-*.so*
72 (for the dynamic loader itself).
73 Other files will be ignored.
74 Also,
75 .B \%ldconfig
76 expects a certain pattern to how the symbolic links are set up,
77 like this example,
78 where the middle file
79 .RB ( libfoo.so.1
80 here) is the SONAME for the library:
82 .in +4n
83 .EX
84 libfoo.so \-> libfoo.so.1 \-> libfoo.so.1.12
85 .EE
86 .in
88 Failure to follow this pattern may result in compatibility issues
89 after an upgrade.
90 .SH OPTIONS
91 .TP
92 .BI \-\-format= fmt
93 .TQ
94 .BI \-c\~ fmt
95 (Since glibc 2.2)
96 .\" commit 45eca4d141c047950db48c69c8941163d0a61fcd
97 Use cache format
98 .IR fmt ,
99 which is one of
100 .BR old ,
101 .BR new ,
103 .BR \%compat .
104 Since glibc 2.32,
105 the default is
106 .BR new .
107 .\" commit cad64f778aced84efdaa04ae64f8737b86f063ab
108 Before that,
109 it was
110 .BR \%compat .
112 .BI \-C\~ cache
114 .I cache
115 instead of
116 .IR /etc/ld.so.cache .
118 .BI \-f\~ conf
120 .I conf
121 instead of
122 .IR /etc/ld.so.conf .
124 .B \-\-ignore\-aux\-cache
126 .B \-i
127 (Since glibc 2.7)
128 .\" commit 27d9ffda17df4d2388687afd12897774fde39bcc
129 Ignore auxiliary cache file.
131 .B \-l
132 (Since glibc 2.2)
133 Interpret each operand as a library name and configure its links.
134 Intended for use only by experts.
136 .B \-n
137 Process only the directories specified on the command line;
138 don't process the trusted directories,
139 nor those specified in
140 .IR /etc/ld.so.conf .
141 Implies
142 .BR \-N .
144 .B \-N
145 Don't rebuild the cache.
146 Unless
147 .B \-X
148 is also specified,
149 links are still updated.
151 .B \-\-print\-cache
153 .B \-p
154 Print the lists of directories and candidate libraries stored in
155 the current cache.
157 .BI \-r\~ root
158 Change to and use
159 .I root
160 as the root directory.
162 .B \-\-verbose
164 .B \-v
165 Verbose mode.
166 Print current version number,
167 the name of each directory as it is scanned,
168 and any links that are created.
169 Overrides quiet mode.
171 .B \-\-version
173 .B \-V
174 Print program version.
176 .B \-X
177 Don't update links.
178 Unless
179 .B \-N
180 is also specified,
181 the cache is still rebuilt.
182 .SH FILES
183 .\" FIXME Since glibc-2.3.4, "include" directives are supported in ld.so.conf
185 .\" FIXME Since glibc-2.4, "hwcap" directives are supported in ld.so.conf
186 .PD 0
188 .I /lib/ld.so
189 is the run-time linker/loader.
191 .I /etc/ld.so.conf
192 contains a list of directories,
193 one per line,
194 in which to search for libraries.
196 .I /etc/ld.so.cache
197 contains an ordered list of libraries found in the directories
198 specified in
199 .IR /etc/ld.so.conf ,
200 as well as those found in the trusted directories.
202 .SH SEE ALSO
203 .BR ldd (1),
204 .BR ld.so (8)