OSDN Git Service

LDP: Update original to LDP v3.68
[linuxjm/LDP_man-pages.git] / original / 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 2012-05-10 "GNU" "Linux Programmer's Manual"
23 .SH NAME
24 ldconfig \- configure dynamic linker run-time bindings
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
43 .B /sbin/ldconfig
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 ,
60 and in the trusted directories
61 .RI ( /lib
62 and
63 .IR /usr/lib ).
64 The cache is used by the run-time linker,
65 .I ld.so
66 or
67 .IR ld-linux.so .
68 .B ldconfig
69 checks the header and filenames of the libraries it encounters when
70 determining which versions should have their links updated.
71 .PP
72 .B ldconfig
73 will attempt to deduce the type of ELF libs (i.e., libc5 or libc6/glibc)
74 based on what C libs, if any, the library was linked against.
75 .\" The following sentence looks suspect
76 .\" (perhaps historical cruft) -- MTK, Jul 2005
77 .\" Therefore, when making dynamic libraries,
78 .\" it is wise to explicitly link against libc (use \-lc).
79 .PP
80 Some existing libs do not contain enough information to allow the deduction of
81 their type.
82 Therefore, the
83 .I /etc/ld.so.conf
84 file format allows the specification of an expected type.
85 This is used
86 .I only
87 for those ELF libs which we can not work out.
88 The format
89 is "dirname=TYPE", where TYPE can be libc4, libc5, or libc6.
90 (This syntax also works on the command line.)
91 Spaces are
92 .I not
93 allowed.
94 Also see the
95 .B \-p
96 option.
97 .B ldconfig
98 should normally be run by the superuser as it may require write
99 permission on some root owned directories and files.
100 .SH OPTIONS
101 .TP
102 .B \-v
103 Verbose mode.
104 Print current version number, the name of each directory as it
105 is scanned, and any links that are created.
106 Overrides quiet mode.
107 .TP
108 .B \-n
109 Only process directories specified on the command line.
110 Don't process the trusted directories
111 .RI ( /lib
112 and
113 .IR /usr/lib )
114 nor those specified in
115 .IR /etc/ld.so.conf .
116 Implies
117 .BR \-N .
118 .TP
119 .B \-N
120 Don't rebuild the cache.
121 Unless
122 .B \-X
123 is also specified, links are still updated.
124 .TP
125 .B \-X
126 Don't update links.
127 Unless
128 .B \-N
129 is also specified, the cache is still rebuilt.
130 .TP
131 .B \-f conf
132 Use
133 .B conf
134 instead of
135 .IR /etc/ld.so.conf .
136 .TP
137 .B \-C cache
138 Use
139 .B cache
140 instead of
141 .IR /etc/ld.so.cache .
142 .TP
143 .B \-r root
144 Change to and use
145 .I root
146 as the root directory.
147 .TP
148 .B \-l
149 Library mode.
150 Manually link individual libraries.
151 Intended for use by experts only.
152 .TP
153 .B \-p
154 Print the lists of directories and candidate libraries stored in
155 the current cache.
156 .SH FILES
157 .PD 0
158 .TP 20
159 .I /lib/ld.so
160 run-time linker/loader
161 .TP 20
162 .I /etc/ld.so.conf
163 File containing a list of colon, space, tab, newline, or comma-separated
164 directories in which to search for libraries.
165 .TP 20
166 .I /etc/ld.so.cache
167 File containing an ordered list of libraries found in the directories
168 specified in
169 .IR /etc/ld.so.conf ,
170 as well as those found in
171 .I /lib
172 and
173 .IR /usr/lib .
174 .PD
175 .SH SEE ALSO
176 .BR ldd (1),
177 .BR ld.so (8)
178 .SH COLOPHON
179 This page is part of release 3.68 of the Linux
180 .I man-pages
181 project.
182 A description of the project,
183 information about reporting bugs,
184 and the latest version of this page,
185 can be found at
186 \%http://www.kernel.org/doc/man\-pages/.