]>
Commit | Line | Data |
---|---|---|
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 | 10 | ldconfig \- 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 |
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 , | |
d7d4b04a MK |
38 | and in the trusted directories, |
39 | .I /lib | |
40 | and | |
2cb6c290 BR |
41 | .IR /usr/lib . |
42 | On some 64-bit architectures such as x86-64, | |
e5a062a4 | 43 | .I /lib |
d7d4b04a | 44 | and |
1ae6b2c7 | 45 | .I /usr/lib |
2a6f36e6 BR |
46 | are the trusted directories for 32-bit libraries, |
47 | while | |
d7d4b04a | 48 | .I /lib64 |
fea681da | 49 | and |
1ae6b2c7 | 50 | .I /usr/lib64 |
2cb6c290 | 51 | are used for 64-bit libraries. |
c6d039a3 | 52 | .P |
fea681da | 53 | The cache is used by the run-time linker, |
0daa9e92 | 54 | .I ld.so |
fea681da | 55 | or |
cd415e73 | 56 | .IR ld\-linux.so . |
2a6f36e6 | 57 | .B \%ldconfig |
2c5f1089 | 58 | checks the header and filenames of the libraries it encounters when |
fea681da | 59 | determining 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 | 64 | should normally be run by the superuser as it may require write |
fea681da | 65 | permission on some root owned directories and files. |
c6d039a3 | 66 | .P |
2a6f36e6 | 67 | .B \%ldconfig |
2cb6c290 | 68 | will 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 |
73 | Other files will be ignored. |
74 | Also, | |
2a6f36e6 | 75 | .B \%ldconfig |
2cb6c290 | 76 | expects a certain pattern to how the symbolic links are set up, |
2a6f36e6 BR |
77 | like this example, |
78 | where the middle file | |
9ad4c535 DD |
79 | .RB ( libfoo.so.1 |
80 | here) is the SONAME for the library: | |
c6d039a3 | 81 | .P |
9ad4c535 DD |
82 | .in +4n |
83 | .EX | |
d064d41a | 84 | libfoo.so \-> libfoo.so.1 \-> libfoo.so.1.12 |
9ad4c535 DD |
85 | .EE |
86 | .in | |
c6d039a3 | 87 | .P |
9ad4c535 DD |
88 | Failure to follow this pattern may result in compatibility issues |
89 | after 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 |
97 | Use cache format |
98 | .IR fmt , | |
99 | which is one of | |
100 | .BR old , | |
101 | .BR new , | |
5a4289a2 | 102 | or |
97d37757 | 103 | .BR \%compat . |
2a6f36e6 BR |
104 | Since glibc 2.32, |
105 | the default is | |
97d37757 | 106 | .BR new . |
4e977eff | 107 | .\" commit cad64f778aced84efdaa04ae64f8737b86f063ab |
2a6f36e6 BR |
108 | Before that, |
109 | it was | |
97d37757 | 110 | .BR \%compat . |
5a4289a2 | 111 | .TP |
97d37757 | 112 | .BI \-C\~ cache |
1d0a65fd | 113 | Use |
3ec31820 | 114 | .I cache |
1d0a65fd MK |
115 | instead of |
116 | .IR /etc/ld.so.cache . | |
117 | .TP | |
97d37757 | 118 | .BI \-f\~ conf |
1d0a65fd | 119 | Use |
3ec31820 | 120 | .I conf |
1d0a65fd MK |
121 | instead 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 | 129 | Ignore auxiliary cache file. |
1d0a65fd MK |
130 | .TP |
131 | .B \-l | |
8df2b503 | 132 | (Since glibc 2.2) |
4c0a4280 | 133 | Interpret each operand as a library name and configure its links. |
2cb6c290 | 134 | Intended for use only by experts. |
fea681da MK |
135 | .TP |
136 | .B \-n | |
2cb6c290 BR |
137 | Process only the directories specified on the command line; |
138 | don't process the trusted directories, | |
fea681da MK |
139 | nor those specified in |
140 | .IR /etc/ld.so.conf . | |
141 | Implies | |
142 | .BR \-N . | |
143 | .TP | |
144 | .B \-N | |
145 | Don't rebuild the cache. | |
146 | Unless | |
147 | .B \-X | |
2a6f36e6 BR |
148 | is also specified, |
149 | links are still updated. | |
fea681da | 150 | .TP |
97d37757 | 151 | .B \-\-print\-cache |
5a3a191d AC |
152 | .TQ |
153 | .B \-p | |
1d0a65fd MK |
154 | Print the lists of directories and candidate libraries stored in |
155 | the current cache. | |
fea681da | 156 | .TP |
97d37757 | 157 | .BI \-r\~ root |
fea681da | 158 | Change to and use |
8478ee02 | 159 | .I root |
fea681da MK |
160 | as the root directory. |
161 | .TP | |
97d37757 | 162 | .B \-\-verbose |
5a3a191d AC |
163 | .TQ |
164 | .B \-v | |
1d0a65fd | 165 | Verbose mode. |
2a6f36e6 BR |
166 | Print current version number, |
167 | the name of each directory as it is scanned, | |
168 | and any links that are created. | |
1d0a65fd | 169 | Overrides quiet mode. |
fea681da | 170 | .TP |
97d37757 | 171 | .B \-\-version |
5a3a191d AC |
172 | .TQ |
173 | .B \-V | |
1c2f799e MK |
174 | Print program version. |
175 | .TP | |
1d0a65fd MK |
176 | .B \-X |
177 | Don't update links. | |
178 | Unless | |
179 | .B \-N | |
2a6f36e6 BR |
180 | is also specified, |
181 | the 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 | 189 | is the run-time linker/loader. |
db9ac60d | 190 | .TP |
8478ee02 | 191 | .I /etc/ld.so.conf |
2cb6c290 | 192 | contains a list of directories, |
2a6f36e6 | 193 | one per line, |
e4819893 | 194 | in which to search for libraries. |
db9ac60d | 195 | .TP |
8478ee02 | 196 | .I /etc/ld.so.cache |
2cb6c290 | 197 | contains an ordered list of libraries found in the directories |
fea681da | 198 | specified in |
49019b8e | 199 | .IR /etc/ld.so.conf , |
d7d4b04a | 200 | as 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) |