]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man8/ldconfig.8
Change things like "NULL-terminated string" to "null-terminated string"
[thirdparty/man-pages.git] / man8 / ldconfig.8
CommitLineData
fea681da
MK
1.\" -*- nroff -*-
2.\" Copyright 1999 SuSE GmbH Nuernberg, Germany
3.\" Author: Thorsten Kukuk <kukuk@suse.de>
4.\"
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 program; see the file COPYING. If not,
17.\" write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18.\" Boston, MA 02111-1307, USA.
19.\"
305a0578 20.\" Modified, 6 May 2002, Michael Kerrisk, <mtk-manpages@gmx.net>
fea681da
MK
21.\" Change listed order of /usr/lib and /lib
22.TH LDCONFIG 8 2002-05-06 "GNU C Library" "Linux Programmer's Manual"
23.SH NAME
24/sbin/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.BR /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
56creates the necessary links and cache to the most recent shared
57libraries found in the directories specified on the command line,
58in the file
59.IR /etc/ld.so.conf ,
60and in the trusted directories
61.RI ( /lib
62and
63.IR /usr/lib ).
64The cache is used by the run-time linker,
65.IR ld.so
66or
67.IR ld-linux.so .
68.B ldconfig
69checks the header and file names of the libraries it encounters when
70determining which versions should have their links updated.
71.PP
72.B ldconfig
73will attempt to deduce the type of ELF libs (ie. libc5 or libc6/glibc)
4d9b6984
MK
74based on what C libs, if any, the library was linked against.
75.\" FIXME: I think the following sentence is suspect (perhaps historical
76.\" cruft) -- MTK, Jul 2005
77Therefore, when making dynamic libraries,
78it is wise to explicitly link against libc (use \-lc).
fea681da
MK
79.PP
80Some existing libs do not contain enough information to allow the deduction of
81their type. Therefore, the
82.IR /etc/ld.so.conf
83file format allows the specification of an expected type. This is
84.B only
85used for those ELF libs which we can not work out. The format
86is "dirname=TYPE", where TYPE can be libc4, libc5, or libc6.
87(This syntax also works on the command line.) Spaces are
88.B not
89allowed. Also see the
4d9b6984 90.B \-p
fea681da
MK
91option.
92.B ldconfig
2c8d1c7d 93should normally be run by the superuser as it may require write
fea681da
MK
94permission on some root owned directories and files.
95.SH OPTIONS
96.TP
97.B \-v
98Verbose mode.
99Print current version number, the name of each directory as it
100is scanned, and any links that are created.
101Overrides quiet mode.
102.TP
103.B \-n
104Only process directories specified on the command line.
105Don't process the trusted directories
106.RI ( /lib
107and
108.IR /usr/lib )
109nor those specified in
110.IR /etc/ld.so.conf .
111Implies
112.BR \-N .
113.TP
114.B \-N
115Don't rebuild the cache.
116Unless
117.B \-X
118is also specified, links are still updated.
119.TP
120.B \-X
121Don't update links.
122Unless
123.B \-N
124is also specified, the cache is still rebuilt.
125.TP
126.B \-f conf
127Use
128.B conf
129instead of
130.IR /etc/ld.so.conf .
131.TP
132.B \-C cache
133Use
134.B cache
135instead of
136.IR /etc/ld.so.cache .
137.TP
138.B \-r root
139Change to and use
140.B root
141as the root directory.
142.TP
143.B \-l
144Library mode. Manually link individual libraries. Intended for
145use by experts only.
146.TP
147.B \-p
148Print the lists of directories and candidate libraries stored in
149the current cache.
150
151.SH FILES
152.PD 0
153.TP 20
154.B /lib/ld.so
155run-time linker/loader
156.TP 20
157.B /etc/ld.so.conf
a898aac5 158File containing a list of colon, space, tab, newline, or comma-separated
fea681da
MK
159directories in which to search for libraries.
160.TP 20
161.B /etc/ld.so.cache
162File containing an ordered list of libraries found in the directories
163specified in
164.BR /etc/ld.so.conf .
165.PD