.\" Copyright 1999 SuSE GmbH Nuernberg, Germany .\" Author: Thorsten Kukuk .\" .\" %%%LICENSE_START(GPLv2+_SW_3_PARA) .\" 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 .\" License along with this manual; if not, see .\" . .\" %%%LICENSE_END .\" .\" Modified, 6 May 2002, Michael Kerrisk, .\" Change listed order of /usr/lib and /lib .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .\" .\" Japanese Version Copyright (c) 1998 NAKANO Takeo all rights reserved. .\" Translated Sat May 23 1998 by NAKANO Takeo .\" Updated & Modified Tue Sep 14 1999 by NAKANO Takeo .\" Updated & Modified Mon Jun 4 20:13:57 JST 2001 .\" by Yuichi SATO .\" .TH LDCONFIG 8 2020\-06\-09 GNU "Linux Programmer's Manual" .SH 名前 ldconfig \- 動的リンカーによる実行時の結合関係を設定する .SH 書式 \fB/sbin/ldconfig\fP [\fB\-nNvXV\fP] [\fB\-f\fP \fIconf\fP] [\fB\-C\fP \fIcache\fP] [\fB\-r\fP \fIroot\fP] \fIdirectory\fP... .PD 0 .PP .PD \fB/sbin/ldconfig\fP \fB\-l\fP [\fB\-v\fP] \fIlibrary\fP... .PD 0 .PP .PD \fB/sbin/ldconfig\fP \fB\-p\fP .SH 説明 \fBldconfig\fP creates the necessary links and cache to the most recent shared libraries found in the directories specified on the command line, in the file \fI/etc/ld.so.conf\fP, and in the trusted directories, \fI/lib\fP and \fI/usr/lib\fP (on some 64\-bit architectures such as x86\-64, \fI/lib\fP and \fI/usr/lib\fP are the trusted directories for 32\-bit libraries, while \fI/lib64\fP and \fI/usr/lib64\fP are used for 64\-bit libraries). .PP キャッシュは実行時リンカー \fIld.so\fP または \fIld\-linux.so\fP によって使われる。 \fBldconfig\fP は処理するライブラリのヘッダー部分とファイル名をチェックし、 どのバージョンに対してリンクを更新すべきかを判断する。 .PP .\" The following sentence looks suspect .\" (perhaps historical cruft) -- MTK, Jul 2005 .\" Therefore, when making dynamic libraries, .\" it is wise to explicitly link against libc (use \-lc). \fBldconfig\fP は ELF ライブラリの種類 (libc5 か libc6/glibc か) を判断するとき、 そのライブラリがリンクしている C ライブラリを参考にする。 .PP すでに存在しているライブラリの中には、種類を区別するために充分な 情報が含まれていないものもある。 このため \fI/etc/ld.so.conf\fP ファイルでライブラリの形式を指定することができるようになっている。 これは区別不能な ELF ライブラリ「だけ」に用いるものである。 フォーマットは "dirname=TYPE" とする。 ここで TYPE は libc4, libc5, libc6 のいずれかである (この書式はコマンドラインでも使える)。 「スペースを入れてはならない」。 \fB\-p\fP オプションも見ておくこと。 \fBldconfig\fP は通常スーパーユーザー権限で実行しなければならない。 root が所有しているディレクトリやファイルへの書き込み権限が 必要になるからである。 .PP Note that \fBldconfig\fP will only look at files that are named \fIlib*.so*\fP (for regular shared objects) or \fIld\-*.so*\fP (for the dynamic loader itself). Other files will be ignored. Also, \fBldconfig\fP expects a certain pattern to how the symlinks are set up, like this example, where the middle file (\fBlibfoo.so.1\fP here) is the SONAME for the library: .PP .in +4n .EX libfoo.so \-> libfoo.so.1 \-> libfoo.so.1.12 .EE .in .PP Failure to follow this pattern may result in compatibility issues after an upgrade. .SH オプション .TP \fB\-c\fP \fIfmt\fP, \fB\-\-format=\fP\fIfmt\fP .\" commit cad64f778aced84efdaa04ae64f8737b86f063ab (Since glibc 2.2) Cache format to use: \fIold\fP, \fInew\fP, or \fIcompat\fP. Since glibc 2.32, the default is \fInew\fP. Before that, it was \fIcompat\fP. .TP \fB\-C \fP\fIcache\fP \fIcache\fP を \fI/etc/ld.so.cache\fP の代わりに用いる。 .TP \fB\-f \fP\fIconf\fP .\" FIXME glibc 2.7 added -i \fIconf\fP を \fI/etc/ld.so.conf\fP の代わりに用いる。 .TP \fB\-i\fP, \fB\-\-ignore\-aux\-cache\fP .\" commit 27d9ffda17df4d2388687afd12897774fde39bcc (Since glibc 2.7) Ignore auxiliary cache file. .TP \fB\-l\fP (glibc 2.2 以降) ライブラリモード。それぞれのライブラリを手動でリンクする。 熟練者のみが用いるべきである。 .TP \fB\-n\fP コマンドラインで指定されたディレクトリのみを処理する。 通常共有ライブラリが置かれるディレクトリや \fI/etc/ld.so.conf\fP で指定されたディレクトリは処理しない。 暗黙のうちに \fB\-N\fP が指定される。 .TP \fB\-N\fP キャッシュを再構成しない。 同時に \fB\-X\fP が同時に指定されなければ、リンクのほうは更新される。 .TP \fB\-p\fP, \fB\-\-print\-cache\fP 現在のキャッシュに保存されているディレクトリのリストと、 ライブラリの候補を表示する。 .TP \fB\-r \fP\fIroot\fP \fIroot\fP にカレントディレクトリを変更し、ここをルートディレクトリとして用いる。 .TP \fB\-v\fP, \fB\-\-verbose\fP 詳細表示モード。 現在のバージョン番号を表示する。 またそれぞれのディレクトリをスキャンし、 新しいリンクを生成するたびに、その内容を表示する。 メッセージ抑制モードを上書きする。 .TP \fB\-V\fP, \fB\-\-version\fP プログラムのバージョンを表示する。 .TP \fB\-X\fP リンクを更新しない。 \fB\-N\fP が同時に指定されなければ、キャッシュのほうは再構成される。 .SH ファイル .\" 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 .PD 0 .TP \fI/lib/ld.so\fP 実行時リンカー/ローダー。 .TP \fI/etc/ld.so.conf\fP ディレクトリのリストが入ったファイル。 1 行に 1 エントリー。それぞれのディレクトリでライブラリが検索される。 .TP \fI/etc/ld.so.cache\fP \fI/etc/ld.so.conf\fP で指定されたディレクトリにあるライブラリ、および信頼されたディレクトリにあるライブラリの順序付きリスト。 .PD .SH 関連項目 \fBldd\fP(1), \fBld.so\fP(8) .SH この文書について この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は \%https://www.kernel.org/doc/man\-pages/ に書かれている。