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