man-pages/man8/ldconfig.8

178 lines
3.9 KiB
Groff
Raw Normal View History

2004-11-03 13:51:07 +00:00
.\" Copyright 1999 SuSE GmbH Nuernberg, Germany
.\" Author: Thorsten Kukuk <kukuk@suse.de>
.\"
.\" %%%LICENSE_START(GPLv2+_3_PARA_SW)
2004-11-03 13:51:07 +00:00
.\" This program is free software; you can redistribute it and/or
.\" modify it under the terms of the GNU General Public License as
.\" published by the Free Software Foundation; either version 2 of the
.\" License, or (at your option) any later version.
.\"
.\" This program is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
.\" General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public
getent.1, _syscall.2, acct.2, adjtimex.2, bdflush.2, brk.2, cacheflush.2, getsid.2, getxattr.2, inotify_add_watch.2, inotify_init.2, inotify_rm_watch.2, ioperm.2, ipc.2, listxattr.2, mlock.2, modify_ldt.2, mremap.2, nanosleep.2, outb.2, ptrace.2, removexattr.2, sched_get_priority_max.2, sched_rr_get_interval.2, sched_setaffinity.2, sched_setparam.2, sched_setscheduler.2, sched_yield.2, setsid.2, setxattr.2, socketcall.2, unimplemented.2, aio_cancel.3, aio_error.3, aio_fsync.3, aio_read.3, aio_return.3, aio_suspend.3, aio_write.3, cfree.3, crypt.3, dlopen.3, errno.3, fenv.3, ftime.3, ftw.3, getgrent_r.3, getpass.3, getpwent_r.3, getutent.3, hsearch.3, lio_listio.3, login.3, longjmp.3, perror.3, printf.3, scandirat.3, setjmp.3, strfmon.3, strtoimax.3, termios.3, ttyname.3, ualarm.3, wcstoimax.3, wordexp.3, console_ioctl.4, dsp56k.4, fd.4, hd.4, intro.4, lp.4, mem.4, null.4, ram.4, rtc.4, sk98lin.4, tty.4, ttyS.4, vcs.4, charmap.5, filesystems.5, ftpusers.5, gai.conf.5, group.5, host.conf.5, hosts.5, intro.5, issue.5, locale.5, motd.5, networks.5, nologin.5, nscd.conf.5, nss.5, nsswitch.conf.5, passwd.5, proc.5, protocols.5, securetty.5, shells.5, termcap.5, ttytype.5, utmp.5, intro.6, armscii-8.7, ascii.7, bootparam.7, cp1251.7, cpuset.7, environ.7, glob.7, intro.7, iso_8859-1.7, iso_8859-10.7, iso_8859-11.7, iso_8859-13.7, iso_8859-14.7, iso_8859-15.7, iso_8859-16.7, iso_8859-2.7, iso_8859-3.7, iso_8859-4.7, iso_8859-5.7, iso_8859-6.7, iso_8859-7.7, iso_8859-8.7, iso_8859-9.7, koi8-r.7, koi8-u.7, posixoptions.7, standards.7, unicode.7, utf-8.7, intro.8, ldconfig.8, nscd.8: Global fix: Update info in source comments on where to get a copy of the GPL Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2013-03-10 09:28:43 +00:00
.\" License along with this manual; if not, see
.\" <http://www.gnu.org/licenses/>.
.\" %%%END_LICENSE
2004-11-03 13:51:07 +00:00
.\"
2007-09-20 06:52:22 +00:00
.\" Modified, 6 May 2002, Michael Kerrisk, <mtk.manpages@gmail.com>
2004-11-03 13:51:07 +00:00
.\" Change listed order of /usr/lib and /lib
.TH LDCONFIG 8 2012-05-10 "GNU" "Linux Programmer's Manual"
2004-11-03 13:51:07 +00:00
.SH NAME
ldconfig \- configure dynamic linker run-time bindings
2004-11-03 13:51:07 +00:00
.SH SYNOPSIS
.B /sbin/ldconfig
[
.B \-nNvXV
]
[
.BR \-f\ conf
]
[
.BR \-C\ cache
]
[
.BR \-r\ root
]
.IR directory \ ...
.PD 0
.PP
.PD
2007-09-20 16:26:31 +00:00
.B /sbin/ldconfig
2004-11-03 13:51:07 +00:00
.B \-l
[
.B \-v
]
.IR library \ ...
.PD 0
.PP
.PD
.B /sbin/ldconfig
.B \-p
.SH DESCRIPTION
.B ldconfig
creates the necessary links and cache to the most recent shared
libraries found in the directories specified on the command line,
in the file
.IR /etc/ld.so.conf ,
and in the trusted directories
.RI ( /lib
and
.IR /usr/lib ).
The cache is used by the run-time linker,
2007-09-20 16:26:31 +00:00
.I ld.so
2004-11-03 13:51:07 +00:00
or
.IR ld-linux.so .
.B ldconfig
2006-02-12 22:15:41 +00:00
checks the header and filenames of the libraries it encounters when
2004-11-03 13:51:07 +00:00
determining which versions should have their links updated.
.PP
.B ldconfig
2007-10-03 19:56:24 +00:00
will attempt to deduce the type of ELF libs (i.e., libc5 or libc6/glibc)
based on what C libs, if any, the library was linked against.
.\" The following sentence looks suspect
2006-02-08 09:44:13 +00:00
.\" (perhaps historical cruft) -- MTK, Jul 2005
.\" Therefore, when making dynamic libraries,
.\" it is wise to explicitly link against libc (use \-lc).
2004-11-03 13:51:07 +00:00
.PP
Some existing libs do not contain enough information to allow the deduction of
their type.
Therefore, the
2007-09-20 16:26:31 +00:00
.I /etc/ld.so.conf
file format allows the specification of an expected type.
This is
2005-11-02 13:55:25 +00:00
.I only
used for those ELF libs which we can not work out.
The format
2004-11-03 13:51:07 +00:00
is "dirname=TYPE", where TYPE can be libc4, libc5, or libc6.
(This syntax also works on the command line.)
Spaces are
2005-11-02 13:55:25 +00:00
.I not
allowed.
Also see the
2005-07-06 07:41:37 +00:00
.B \-p
2004-11-03 13:51:07 +00:00
option.
.B ldconfig
should normally be run by the superuser as it may require write
2004-11-03 13:51:07 +00:00
permission on some root owned directories and files.
.SH OPTIONS
.TP
.B \-v
Verbose mode.
Print current version number, the name of each directory as it
is scanned, and any links that are created.
Overrides quiet mode.
.TP
.B \-n
Only process directories specified on the command line.
Don't process the trusted directories
.RI ( /lib
and
.IR /usr/lib )
nor those specified in
.IR /etc/ld.so.conf .
Implies
.BR \-N .
.TP
.B \-N
Don't rebuild the cache.
Unless
.B \-X
is also specified, links are still updated.
.TP
.B \-X
Don't update links.
Unless
.B \-N
is also specified, the cache is still rebuilt.
.TP
.B \-f conf
Use
.B conf
instead of
.IR /etc/ld.so.conf .
.TP
.B \-C cache
Use
.B cache
instead of
.IR /etc/ld.so.cache .
.TP
.B \-r root
Change to and use
2005-11-02 13:55:25 +00:00
.I root
2004-11-03 13:51:07 +00:00
as the root directory.
.TP
.B \-l
Library mode.
Manually link individual libraries.
Intended for use by experts only.
2004-11-03 13:51:07 +00:00
.TP
.B \-p
Print the lists of directories and candidate libraries stored in
the current cache.
.SH FILES
.PD 0
.TP 20
2005-11-02 13:55:25 +00:00
.I /lib/ld.so
2004-11-03 13:51:07 +00:00
run-time linker/loader
.TP 20
2005-11-02 13:55:25 +00:00
.I /etc/ld.so.conf
2005-06-24 14:58:43 +00:00
File containing a list of colon, space, tab, newline, or comma-separated
2004-11-03 13:51:07 +00:00
directories in which to search for libraries.
.TP 20
2005-11-02 13:55:25 +00:00
.I /etc/ld.so.cache
2004-11-03 13:51:07 +00:00
File containing an ordered list of libraries found in the directories
specified in
.IR /etc/ld.so.conf ,
as well as those found in
.I /lib
and
.IR /usr/lib .
2004-11-03 13:51:07 +00:00
.PD
2007-06-16 07:23:16 +00:00
.SH SEE ALSO
2007-06-15 20:22:43 +00:00
.BR ldd (1),
.BR ld.so (8)