]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man8/ldconfig.8
getent.1, _syscall.2, acct.2, adjtimex.2, bdflush.2, brk.2, cacheflush.2, getsid...
[thirdparty/man-pages.git] / man8 / ldconfig.8
1 .\" Copyright 1999 SuSE GmbH Nuernberg, Germany
2 .\" Author: Thorsten Kukuk <kukuk@suse.de>
3 .\"
4 .\" This program is free software; you can redistribute it and/or
5 .\" modify it under the terms of the GNU General Public License as
6 .\" published by the Free Software Foundation; either version 2 of the
7 .\" License, or (at your option) any later version.
8 .\"
9 .\" This program is distributed in the hope that it will be useful,
10 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
11 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 .\" General Public License for more details.
13 .\"
14 .\" You should have received a copy of the GNU General Public
15 .\" License along with this manual; if not, see
16 .\" <http://www.gnu.org/licenses/>.
17 .\"
18 .\" Modified, 6 May 2002, Michael Kerrisk, <mtk.manpages@gmail.com>
19 .\" Change listed order of /usr/lib and /lib
20 .TH LDCONFIG 8 2012-05-10 "GNU" "Linux Programmer's Manual"
21 .SH NAME
22 ldconfig \- configure dynamic linker run-time bindings
23 .SH SYNOPSIS
24 .B /sbin/ldconfig
25 [
26 .B \-nNvXV
27 ]
28 [
29 .BR \-f\ conf
30 ]
31 [
32 .BR \-C\ cache
33 ]
34 [
35 .BR \-r\ root
36 ]
37 .IR directory \ ...
38 .PD 0
39 .PP
40 .PD
41 .B /sbin/ldconfig
42 .B \-l
43 [
44 .B \-v
45 ]
46 .IR library \ ...
47 .PD 0
48 .PP
49 .PD
50 .B /sbin/ldconfig
51 .B \-p
52 .SH DESCRIPTION
53 .B ldconfig
54 creates the necessary links and cache to the most recent shared
55 libraries found in the directories specified on the command line,
56 in the file
57 .IR /etc/ld.so.conf ,
58 and in the trusted directories
59 .RI ( /lib
60 and
61 .IR /usr/lib ).
62 The cache is used by the run-time linker,
63 .I ld.so
64 or
65 .IR ld-linux.so .
66 .B ldconfig
67 checks the header and filenames of the libraries it encounters when
68 determining which versions should have their links updated.
69 .PP
70 .B ldconfig
71 will attempt to deduce the type of ELF libs (i.e., libc5 or libc6/glibc)
72 based on what C libs, if any, the library was linked against.
73 .\" The following sentence looks suspect
74 .\" (perhaps historical cruft) -- MTK, Jul 2005
75 .\" Therefore, when making dynamic libraries,
76 .\" it is wise to explicitly link against libc (use \-lc).
77 .PP
78 Some existing libs do not contain enough information to allow the deduction of
79 their type.
80 Therefore, the
81 .I /etc/ld.so.conf
82 file format allows the specification of an expected type.
83 This is
84 .I only
85 used for those ELF libs which we can not work out.
86 The format
87 is "dirname=TYPE", where TYPE can be libc4, libc5, or libc6.
88 (This syntax also works on the command line.)
89 Spaces are
90 .I not
91 allowed.
92 Also see the
93 .B \-p
94 option.
95 .B ldconfig
96 should normally be run by the superuser as it may require write
97 permission on some root owned directories and files.
98 .SH OPTIONS
99 .TP
100 .B \-v
101 Verbose mode.
102 Print current version number, the name of each directory as it
103 is scanned, and any links that are created.
104 Overrides quiet mode.
105 .TP
106 .B \-n
107 Only process directories specified on the command line.
108 Don't process the trusted directories
109 .RI ( /lib
110 and
111 .IR /usr/lib )
112 nor those specified in
113 .IR /etc/ld.so.conf .
114 Implies
115 .BR \-N .
116 .TP
117 .B \-N
118 Don't rebuild the cache.
119 Unless
120 .B \-X
121 is also specified, links are still updated.
122 .TP
123 .B \-X
124 Don't update links.
125 Unless
126 .B \-N
127 is also specified, the cache is still rebuilt.
128 .TP
129 .B \-f conf
130 Use
131 .B conf
132 instead of
133 .IR /etc/ld.so.conf .
134 .TP
135 .B \-C cache
136 Use
137 .B cache
138 instead of
139 .IR /etc/ld.so.cache .
140 .TP
141 .B \-r root
142 Change to and use
143 .I root
144 as the root directory.
145 .TP
146 .B \-l
147 Library mode.
148 Manually link individual libraries.
149 Intended for use by experts only.
150 .TP
151 .B \-p
152 Print the lists of directories and candidate libraries stored in
153 the current cache.
154 .SH FILES
155 .PD 0
156 .TP 20
157 .I /lib/ld.so
158 run-time linker/loader
159 .TP 20
160 .I /etc/ld.so.conf
161 File containing a list of colon, space, tab, newline, or comma-separated
162 directories in which to search for libraries.
163 .TP 20
164 .I /etc/ld.so.cache
165 File containing an ordered list of libraries found in the directories
166 specified in
167 .IR /etc/ld.so.conf ,
168 as well as those found in
169 .I /lib
170 and
171 .IR /usr/lib .
172 .PD
173 .SH SEE ALSO
174 .BR ldd (1),
175 .BR ld.so (8)