man-pages/man8/ldconfig.8

204 lines
4.6 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+_SW_3_PARA)
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/>.
.\" %%%LICENSE_END
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 2015-03-29 "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,
.I /lib
and
.IR /usr/lib
(on some 64-bit architectures such as x86-64,
.I lib
and
.IR /usr/lib
are the trusted directories for 32-bit libraries, while
.I /lib64
2004-11-03 13:51:07 +00:00
and
.IR /usr/lib64
are used for 64-bit libraries).
2004-11-03 13:51:07 +00:00
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.
intro.1, _syscall.2, access.2, arch_prctl.2, cacheflush.2, chown.2, clock_getres.2, clone.2, create_module.2, fcntl.2, flock.2, get_kernel_syms.2, get_robust_list.2, get_thread_area.2, getcpu.2, getpriority.2, getrlimit.2, getrusage.2, ioprio_set.2, kexec_load.2, madvise.2, mbind.2, migrate_pages.2, mknod.2, mmap.2, mount.2, move_pages.2, mprotect.2, open.2, pause.2, pciconfig_read.2, perf_event_open.2, prctl.2, ptrace.2, query_module.2, read.2, reboot.2, recv.2, s390_runtime_instr.2, sched_setscheduler.2, select_tut.2, send.2, set_mempolicy.2, setfsgid.2, setfsuid.2, sigaction.2, spu_create.2, spu_run.2, stime.2, swapon.2, syslog.2, timer_create.2, timer_getoverrun.2, times.2, tkill.2, umount.2, unimplemented.2, ustat.2, vm86.2, wait.2, abs.3, aio_read.3, aio_write.3, bsd_signal.3, catgets.3, clearenv.3, cmsg.3, dbopen.3, dirfd.3, dlopen.3, exec.3, fenv.3, ferror.3, fmemopen.3, fnmatch.3, fopen.3, futimes.3, getaddrinfo.3, getifaddrs.3, getipnodebyname.3, hsearch.3, if_nameindex.3, inet_pton.3, mblen.3, mbrlen.3, mbsrtowcs.3, mbtowc.3, mcheck.3, memfrob.3, mq_notify.3, netlink.3, posix_memalign.3, printf.3, pthread_attr_setscope.3, pthread_cleanup_push.3, pthread_kill_other_threads_np.3, pthread_self.3, pthread_setcancelstate.3, pthread_setconcurrency.3, raise.3, resolver.3, rpc.3, rtime.3, rtnetlink.3, scanf.3, setbuf.3, setnetgrent.3, shm_open.3, sigpause.3, sigset.3, sigwait.3, sockatmark.3, strcasecmp.3, strcmp.3, strdup.3, strftime.3, strptime.3, strsignal.3, strverscmp.3, sysv_signal.3, termios.3, wcrtomb.3, wcsnlen.3, wcsnrtombs.3, wcsrtombs.3, wctomb.3, wprintf.3, console_codes.4, cpuid.4, msr.4, rtc.4, sk98lin.4, st.4, tty.4, charmap.5, core.5, elf.5, hosts.equiv.5, proc.5, resolv.conf.5, services.5, slabinfo.5, arp.7, bootparam.7, capabilities.7, charsets.7, cpuset.7, ddp.7, epoll.7, feature_test_macros.7, futex.7, hier.7, icmp.7, inotify.7, ip.7, ipv6.7, man-pages.7, mdoc.7, mdoc.samples.7, netdevice.7, netlink.7, numa.7, packet.7, path_resolution.7, posixoptions.7, pthreads.7, raw.7, rtld-audit.7, rtnetlink.7, sem_overview.7, sigevent.7, socket.7, spufs.7, tcp.7, udp.7, unicode.7, uri.7, utf-8.7, intro.8, ldconfig.8, sync.8: Global fix: fix placement of word "only" Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2013-03-31 08:53:00 +00:00
This is used
2005-11-02 13:55:25 +00:00
.I only
intro.1, _syscall.2, access.2, arch_prctl.2, cacheflush.2, chown.2, clock_getres.2, clone.2, create_module.2, fcntl.2, flock.2, get_kernel_syms.2, get_robust_list.2, get_thread_area.2, getcpu.2, getpriority.2, getrlimit.2, getrusage.2, ioprio_set.2, kexec_load.2, madvise.2, mbind.2, migrate_pages.2, mknod.2, mmap.2, mount.2, move_pages.2, mprotect.2, open.2, pause.2, pciconfig_read.2, perf_event_open.2, prctl.2, ptrace.2, query_module.2, read.2, reboot.2, recv.2, s390_runtime_instr.2, sched_setscheduler.2, select_tut.2, send.2, set_mempolicy.2, setfsgid.2, setfsuid.2, sigaction.2, spu_create.2, spu_run.2, stime.2, swapon.2, syslog.2, timer_create.2, timer_getoverrun.2, times.2, tkill.2, umount.2, unimplemented.2, ustat.2, vm86.2, wait.2, abs.3, aio_read.3, aio_write.3, bsd_signal.3, catgets.3, clearenv.3, cmsg.3, dbopen.3, dirfd.3, dlopen.3, exec.3, fenv.3, ferror.3, fmemopen.3, fnmatch.3, fopen.3, futimes.3, getaddrinfo.3, getifaddrs.3, getipnodebyname.3, hsearch.3, if_nameindex.3, inet_pton.3, mblen.3, mbrlen.3, mbsrtowcs.3, mbtowc.3, mcheck.3, memfrob.3, mq_notify.3, netlink.3, posix_memalign.3, printf.3, pthread_attr_setscope.3, pthread_cleanup_push.3, pthread_kill_other_threads_np.3, pthread_self.3, pthread_setcancelstate.3, pthread_setconcurrency.3, raise.3, resolver.3, rpc.3, rtime.3, rtnetlink.3, scanf.3, setbuf.3, setnetgrent.3, shm_open.3, sigpause.3, sigset.3, sigwait.3, sockatmark.3, strcasecmp.3, strcmp.3, strdup.3, strftime.3, strptime.3, strsignal.3, strverscmp.3, sysv_signal.3, termios.3, wcrtomb.3, wcsnlen.3, wcsnrtombs.3, wcsrtombs.3, wctomb.3, wprintf.3, console_codes.4, cpuid.4, msr.4, rtc.4, sk98lin.4, st.4, tty.4, charmap.5, core.5, elf.5, hosts.equiv.5, proc.5, resolv.conf.5, services.5, slabinfo.5, arp.7, bootparam.7, capabilities.7, charsets.7, cpuset.7, ddp.7, epoll.7, feature_test_macros.7, futex.7, hier.7, icmp.7, inotify.7, ip.7, ipv6.7, man-pages.7, mdoc.7, mdoc.samples.7, netdevice.7, netlink.7, numa.7, packet.7, path_resolution.7, posixoptions.7, pthreads.7, raw.7, rtld-audit.7, rtnetlink.7, sem_overview.7, sigevent.7, socket.7, spufs.7, tcp.7, udp.7, unicode.7, uri.7, utf-8.7, intro.8, ldconfig.8, sync.8: Global fix: fix placement of word "only" Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2013-03-31 08:53:00 +00:00
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
.BR \-c " \fIfmt\fP, " \-\-format=\fIfmt\fP
(Since glibc 2.2)
Cache format to use:
.IR old ,
.IR new ,
or
.IR compat
(default).
.TP
.B \-C cache
Use
.B cache
instead of
.IR /etc/ld.so.cache .
.TP
.B \-f conf
Use
.B conf
instead of
.IR /etc/ld.so.conf .
.\" FIXME glibc 2.7 added -i
.TP
.BR \-i ", " \-\-ignore\-aux\-cache
(Since glibc 2.7)
.\" commit 27d9ffda17df4d2388687afd12897774fde39bcc
Ignore auxiliary cache file.
.TP
.B \-l
(Since glibc 2.2)
Library mode.
Manually link individual libraries.
Intended for use by experts only.
2004-11-03 13:51:07 +00:00
.TP
.B \-n
Process only the directories specified on the command line.
Don't process the trusted directories,
2004-11-03 13:51:07 +00:00
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
.BR \-p ", " \-\-print\-cache
Print the lists of directories and candidate libraries stored in
the current cache.
2004-11-03 13:51:07 +00:00
.TP
.BI "\-r " root
2004-11-03 13:51:07 +00:00
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
.BR \-v ", " \-\-verbose
Verbose mode.
Print current version number, the name of each directory as it
is scanned, and any links that are created.
Overrides quiet mode.
2004-11-03 13:51:07 +00:00
.TP
.BR \-V ", " \-\-version
Print program version.
.TP
.B \-X
Don't update links.
Unless
.B \-N
is also specified, the cache is still rebuilt.
2004-11-03 13:51:07 +00:00
.SH FILES
.\" FIXME Since glibc-2.3.4, "include" directives are supported in ld.so.conf
.\"
.\" FIXME Since glibc-2.4, "hwcap" directives are supported in ld.so.conf
2004-11-03 13:51:07 +00:00
.PD 0
.TP 20
2005-11-02 13:55:25 +00:00
.I /lib/ld.so
Run-time linker/loader.
2004-11-03 13:51:07 +00:00
.TP 20
2005-11-02 13:55:25 +00:00
.I /etc/ld.so.conf
File containing a list of directories, one per line,
in which to search for libraries.
2004-11-03 13:51:07 +00:00
.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 the trusted directories.
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)