以下是我在运行 Linux 的 Fedora 发行版的系统上找到源代码位置的方法。(对于 Debian、Ubuntu 和类似发行版,使用的命令会有所不同。)
rpm -qfi `which ldconfig`
Run Code Online (Sandbox Code Playgroud)
(那些`s是反引号,而不是撇号。)
这输出以下内容
Name : glibc Relocations: (not relocatable)
Version : 2.13 Vendor: Fedora Project
Release : 1 Build Date: Thu 20 Jan 2011 10:52:15 AM GMT
Install Date: Sun 13 Mar 2011 11:42:50 AM GMT Build Host: x86-04.phx2.fedoraproject.org
Group : System Environment/Libraries Source RPM: glibc-2.13-1.src.rpm
Size : 13616282 License: LGPLv2+ and LGPLv2+ with exceptions and GPLv2+
Signature : RSA/SHA256, Thu 20 Jan 2011 04:42:22 PM GMT, Key ID 421caddb97a1071f
Packager : Fedora Project
URL : http://www.gnu.org/software/glibc/
Summary : The GNU libc libraries
Description :
The glibc package contains standard libraries which are used by
multiple programs on the system. In order to save disk space and
memory, as well as to make upgrading easier, common system code is
kept in one place and shared between programs. This particular package
contains the most important sets of shared libraries: the standard C
library and the standard math library. Without these two libraries, a
Linux system will not function.
Run Code Online (Sandbox Code Playgroud)
此输出的重要部分是 Source RPM 字段。这表明 ldconfig 是 glibc 项目的一部分(至少根据 Fedora 的说法,某些发行版偶尔会将两个密切相关的源项目打包在一个包中,但这种情况很少见)。
因此,希望您可以在此 tarball 中找到 ldconfig 的源代码:http://ftp.gnu.org/gnu/glibc/glibc-2.9.tar.gz
万一它不存在,您应该能够在 Fedora 发行版的 glibc 源 rpm 中找到它(或您的发行版的等效源包)。
归档时间: |
|
查看次数: |
3637 次 |
最近记录: |