]>
Commit | Line | Data |
---|---|---|
fea681da MK |
1 | .\" Copyright 1999 SuSE GmbH Nuernberg, Germany |
2 | .\" Author: Thorsten Kukuk <kukuk@suse.de> | |
3 | .\" | |
f0008367 | 4 | .\" %%%LICENSE_START(GPLv2+_SW_3_PARA) |
fea681da MK |
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. | |
9 | .\" | |
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. | |
14 | .\" | |
15 | .\" You should have received a copy of the GNU General Public | |
c715f741 MK |
16 | .\" License along with this manual; if not, see |
17 | .\" <http://www.gnu.org/licenses/>. | |
8ff7380d | 18 | .\" %%%LICENSE_END |
fea681da | 19 | .\" |
c11b1abf | 20 | .\" Modified, 6 May 2002, Michael Kerrisk, <mtk.manpages@gmail.com> |
fea681da | 21 | .\" Change listed order of /usr/lib and /lib |
1e64c86b | 22 | .TH LDCONFIG 8 2015-03-29 "GNU" "Linux Programmer's Manual" |
fea681da | 23 | .SH NAME |
3c6d314a | 24 | ldconfig \- configure dynamic linker run-time bindings |
fea681da MK |
25 | .SH SYNOPSIS |
26 | .B /sbin/ldconfig | |
27 | [ | |
28 | .B \-nNvXV | |
29 | ] | |
30 | [ | |
31 | .BR \-f\ conf | |
32 | ] | |
33 | [ | |
34 | .BR \-C\ cache | |
35 | ] | |
36 | [ | |
37 | .BR \-r\ root | |
38 | ] | |
39 | .IR directory \ ... | |
40 | .PD 0 | |
41 | .PP | |
42 | .PD | |
0daa9e92 | 43 | .B /sbin/ldconfig |
fea681da MK |
44 | .B \-l |
45 | [ | |
46 | .B \-v | |
47 | ] | |
48 | .IR library \ ... | |
49 | .PD 0 | |
50 | .PP | |
51 | .PD | |
52 | .B /sbin/ldconfig | |
53 | .B \-p | |
54 | .SH DESCRIPTION | |
55 | .B ldconfig | |
56 | creates the necessary links and cache to the most recent shared | |
57 | libraries found in the directories specified on the command line, | |
58 | in the file | |
59 | .IR /etc/ld.so.conf , | |
d7d4b04a MK |
60 | and in the trusted directories, |
61 | .I /lib | |
62 | and | |
63 | .IR /usr/lib | |
64 | (on some 64-bit architectures such as x86-64, | |
65 | .I lib | |
66 | and | |
67 | .IR /usr/lib | |
68 | are the trusted directories for 32-bit libraries, while | |
69 | .I /lib64 | |
fea681da | 70 | and |
d7d4b04a MK |
71 | .IR /usr/lib64 |
72 | are used for 64-bit libraries). | |
73 | ||
fea681da | 74 | The cache is used by the run-time linker, |
0daa9e92 | 75 | .I ld.so |
fea681da MK |
76 | or |
77 | .IR ld-linux.so . | |
78 | .B ldconfig | |
2c5f1089 | 79 | checks the header and filenames of the libraries it encounters when |
fea681da MK |
80 | determining which versions should have their links updated. |
81 | .PP | |
82 | .B ldconfig | |
106b8b3c MK |
83 | will attempt to deduce the type of ELF libraries (i.e., libc5 or libc6/glibc) |
84 | based on what C libraries, if any, the library was linked against. | |
9e92e193 | 85 | .\" The following sentence looks suspect |
92057f4d | 86 | .\" (perhaps historical cruft) -- MTK, Jul 2005 |
9e92e193 MK |
87 | .\" Therefore, when making dynamic libraries, |
88 | .\" it is wise to explicitly link against libc (use \-lc). | |
fea681da | 89 | .PP |
106b8b3c MK |
90 | Some existing libraries do not contain enough information |
91 | to allow the deduction of their type. | |
c13182ef | 92 | Therefore, the |
0daa9e92 | 93 | .I /etc/ld.so.conf |
c13182ef | 94 | file format allows the specification of an expected type. |
33a0ccb2 | 95 | This is used |
8478ee02 | 96 | .I only |
106b8b3c | 97 | for those ELF libraries which we can not work out. |
c13182ef | 98 | The format |
fea681da | 99 | is "dirname=TYPE", where TYPE can be libc4, libc5, or libc6. |
c13182ef MK |
100 | (This syntax also works on the command line.) |
101 | Spaces are | |
8478ee02 | 102 | .I not |
c13182ef MK |
103 | allowed. |
104 | Also see the | |
4d9b6984 | 105 | .B \-p |
fea681da MK |
106 | option. |
107 | .B ldconfig | |
2c8d1c7d | 108 | should normally be run by the superuser as it may require write |
fea681da MK |
109 | permission on some root owned directories and files. |
110 | .SH OPTIONS | |
111 | .TP | |
5a4289a2 MK |
112 | .BR \-c " \fIfmt\fP, " \-\-format=\fIfmt\fP |
113 | (Since glibc 2.2) | |
114 | Cache format to use: | |
115 | .IR old , | |
116 | .IR new , | |
117 | or | |
118 | .IR compat | |
119 | (default). | |
120 | .TP | |
3ec31820 | 121 | .BI "\-C " cache |
1d0a65fd | 122 | Use |
3ec31820 | 123 | .I cache |
1d0a65fd MK |
124 | instead of |
125 | .IR /etc/ld.so.cache . | |
126 | .TP | |
3ec31820 | 127 | .BI "\-f " conf |
1d0a65fd | 128 | Use |
3ec31820 | 129 | .I conf |
1d0a65fd MK |
130 | instead of |
131 | .IR /etc/ld.so.conf . | |
de34d450 MK |
132 | .\" FIXME glibc 2.7 added -i |
133 | .TP | |
1927bf89 | 134 | .BR \-i ", " \-\-ignore\-aux\-cache |
de34d450 MK |
135 | (Since glibc 2.7) |
136 | .\" commit 27d9ffda17df4d2388687afd12897774fde39bcc | |
137 | Ignore auxiliary cache file. | |
1d0a65fd MK |
138 | .TP |
139 | .B \-l | |
8df2b503 | 140 | (Since glibc 2.2) |
1d0a65fd MK |
141 | Library mode. |
142 | Manually link individual libraries. | |
143 | Intended for use by experts only. | |
fea681da MK |
144 | .TP |
145 | .B \-n | |
37fa8a5a | 146 | Process only the directories specified on the command line. |
d7d4b04a | 147 | Don't process the trusted directories, |
fea681da MK |
148 | nor those specified in |
149 | .IR /etc/ld.so.conf . | |
150 | Implies | |
151 | .BR \-N . | |
152 | .TP | |
153 | .B \-N | |
154 | Don't rebuild the cache. | |
155 | Unless | |
156 | .B \-X | |
157 | is also specified, links are still updated. | |
158 | .TP | |
303bef83 | 159 | .BR \-p ", " \-\-print\-cache |
1d0a65fd MK |
160 | Print the lists of directories and candidate libraries stored in |
161 | the current cache. | |
fea681da | 162 | .TP |
5c656ff1 | 163 | .BI "\-r " root |
fea681da | 164 | Change to and use |
8478ee02 | 165 | .I root |
fea681da MK |
166 | as the root directory. |
167 | .TP | |
303bef83 | 168 | .BR \-v ", " \-\-verbose |
1d0a65fd MK |
169 | Verbose mode. |
170 | Print current version number, the name of each directory as it | |
171 | is scanned, and any links that are created. | |
172 | Overrides quiet mode. | |
fea681da | 173 | .TP |
1c2f799e MK |
174 | .BR \-V ", " \-\-version |
175 | Print program version. | |
176 | .TP | |
1d0a65fd MK |
177 | .B \-X |
178 | Don't update links. | |
179 | Unless | |
180 | .B \-N | |
181 | is also specified, 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 MK |
186 | .PD 0 |
187 | .TP 20 | |
8478ee02 | 188 | .I /lib/ld.so |
f14c973a | 189 | Run-time linker/loader. |
fea681da | 190 | .TP 20 |
8478ee02 | 191 | .I /etc/ld.so.conf |
e4819893 MK |
192 | File containing a list of directories, one per line, |
193 | in which to search for libraries. | |
fea681da | 194 | .TP 20 |
8478ee02 | 195 | .I /etc/ld.so.cache |
fea681da MK |
196 | File containing an ordered list of libraries found in the directories |
197 | specified in | |
49019b8e | 198 | .IR /etc/ld.so.conf , |
d7d4b04a | 199 | as well as those found in the trusted directories. |
fea681da | 200 | .PD |
8bfe5356 | 201 | .SH SEE ALSO |
12960935 MK |
202 | .BR ldd (1), |
203 | .BR ld.so (8) |