]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man8/ldconfig.8
share/mk/: build-html: Don't build mbind.2 and set_mempolicy.2
[thirdparty/man-pages.git] / man8 / ldconfig.8
1 .\" Copyright 1999 SuSE GmbH Nuernberg, Germany
2 .\" Author: Thorsten Kukuk <kukuk@suse.de>
3 .\"
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.
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
16 .\" License along with this manual; if not, see
17 .\" <http://www.gnu.org/licenses/>.
18 .\" %%%LICENSE_END
19 .\"
20 .\" Modified, 6 May 2002, Michael Kerrisk, <mtk.manpages@gmail.com>
21 .\" Change listed order of /usr/lib and /lib
22 .TH LDCONFIG 8 2017-09-15 "GNU" "Linux Programmer's Manual"
23 .SH NAME
24 ldconfig \- configure dynamic linker run-time bindings
25 .SH SYNOPSIS
26 .BR /sbin/ldconfig " [" \-nNvXV "] [" \-f " \fIconf\fP] [" \-C " \fIcache\fP] [" \-r " \fIroot\fP]"
27 .IR directory \...
28 .PD 0
29 .PP
30 .PD
31 .B /sbin/ldconfig
32 .B \-l
33 .RB [ \-v ]
34 .IR library \...
35 .PD 0
36 .PP
37 .PD
38 .B /sbin/ldconfig
39 .B \-p
40 .SH DESCRIPTION
41 .B ldconfig
42 creates the necessary links and cache to the most recent shared
43 libraries found in the directories specified on the command line,
44 in the file
45 .IR /etc/ld.so.conf ,
46 and in the trusted directories,
47 .I /lib
48 and
49 .IR /usr/lib
50 (on some 64-bit architectures such as x86-64,
51 .I /lib
52 and
53 .IR /usr/lib
54 are the trusted directories for 32-bit libraries, while
55 .I /lib64
56 and
57 .IR /usr/lib64
58 are used for 64-bit libraries).
59 .PP
60 The cache is used by the run-time linker,
61 .I ld.so
62 or
63 .IR ld-linux.so .
64 .B ldconfig
65 checks the header and filenames of the libraries it encounters when
66 determining which versions should have their links updated.
67 .PP
68 .B ldconfig
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).
75 .PP
76 Some existing libraries do not contain enough information
77 to allow the deduction of their type.
78 Therefore, the
79 .I /etc/ld.so.conf
80 file format allows the specification of an expected type.
81 This is used
82 .I only
83 for those ELF libraries which we can not work out.
84 The format
85 is "dirname=TYPE", where TYPE can be libc4, libc5, or libc6.
86 (This syntax also works on the command line.)
87 Spaces are
88 .I not
89 allowed.
90 Also see the
91 .B \-p
92 option.
93 .B ldconfig
94 should normally be run by the superuser as it may require write
95 permission on some root owned directories and files.
96 .SH OPTIONS
97 .TP
98 .BR \-c " \fIfmt\fP, " \-\-format=\fIfmt\fP
99 (Since glibc 2.2)
100 Cache format to use:
101 .IR old ,
102 .IR new ,
103 or
104 .IR compat
105 (default).
106 .TP
107 .BI "\-C " cache
108 Use
109 .I cache
110 instead of
111 .IR /etc/ld.so.cache .
112 .TP
113 .BI "\-f " conf
114 Use
115 .I conf
116 instead of
117 .IR /etc/ld.so.conf .
118 .\" FIXME glibc 2.7 added -i
119 .TP
120 .BR \-i ", " \-\-ignore\-aux\-cache
121 (Since glibc 2.7)
122 .\" commit 27d9ffda17df4d2388687afd12897774fde39bcc
123 Ignore auxiliary cache file.
124 .TP
125 .B \-l
126 (Since glibc 2.2)
127 Library mode.
128 Manually link individual libraries.
129 Intended for use by experts only.
130 .TP
131 .B \-n
132 Process only the directories specified on the command line.
133 Don't process the trusted directories,
134 nor those specified in
135 .IR /etc/ld.so.conf .
136 Implies
137 .BR \-N .
138 .TP
139 .B \-N
140 Don't rebuild the cache.
141 Unless
142 .B \-X
143 is also specified, links are still updated.
144 .TP
145 .BR \-p ", " \-\-print\-cache
146 Print the lists of directories and candidate libraries stored in
147 the current cache.
148 .TP
149 .BI "\-r " root
150 Change to and use
151 .I root
152 as the root directory.
153 .TP
154 .BR \-v ", " \-\-verbose
155 Verbose mode.
156 Print current version number, the name of each directory as it
157 is scanned, and any links that are created.
158 Overrides quiet mode.
159 .TP
160 .BR \-V ", " \-\-version
161 Print program version.
162 .TP
163 .B \-X
164 Don't update links.
165 Unless
166 .B \-N
167 is also specified, the cache is still rebuilt.
168 .SH FILES
169 .\" FIXME Since glibc-2.3.4, "include" directives are supported in ld.so.conf
170 .\"
171 .\" FIXME Since glibc-2.4, "hwcap" directives are supported in ld.so.conf
172 .PD 0
173 .TP
174 .I /lib/ld.so
175 Run-time linker/loader.
176 .TP
177 .I /etc/ld.so.conf
178 File containing a list of directories, one per line,
179 in which to search for libraries.
180 .TP
181 .I /etc/ld.so.cache
182 File containing an ordered list of libraries found in the directories
183 specified in
184 .IR /etc/ld.so.conf ,
185 as well as those found in the trusted directories.
186 .PD
187 .SH SEE ALSO
188 .BR ldd (1),
189 .BR ld.so (8)