centos(以centos 6.0为例):

(1) 可通过rpm -qa | grep glibc查看系统目前安装了哪些和glibc有关的包:

[root@Cluster ~]# rpm -qa | grep glibc







如果想进一步查看,可通过rpm -qi glibc:

[root@Cluster ~]# rpm -qi glibc

Name : glibc Relocations: (not relocatable)

Version : 2.12 Vendor: CentOS

Release : 1.47.el6_2.12 Build Date: 2012年05月10日 星期四 16时11分39秒

Install Date: 2012年05月21日 星期一 17时46分08秒 Build Host:

Group : System Environment/Libraries Source RPM: glibc-2.12-1.47.el6_2.12.src.rpm

Size : 12871227 License: LGPLv2+ and LGPLv2+ with exceptions and GPLv2+

Signature : RSA/SHA1, 2012年05月10日 星期四 18时01分09秒, Key ID 0946fca2c105b9de

Packager : CentOS BuildSystem


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.


(2) 也可以通过查看ls -l /lib/输出结果:

[root@Cluster ~]# ls -l /lib/

lrwxrwxrwx. 1 root root 12 5月 21 17:46 /lib/ ->


 ubuntu(以ubuntu 11.04为例):

(1) 查看 ls -l /lib/i386-linux-gnu/的输出:

wzw@wzw-Lenovo:~$ ls -l /lib/i386-linux-gnu/

lrwxrwxrwx 1 root root 12 2012-07-15 09:14 /lib/i386-linux-gnu/ ->

(2) 也可以使用 apt-cache show libc6:

wzw@wzw-Lenovo:~$ apt-cache show libc6

Package: libc6

Priority: required

Section: libs

Installed-Size: 9456

Maintainer: Ubuntu Core developers

Original-Maintainer: GNU Libc Maintainers

Architecture: i386

Source: eglibc

Version: 2.13-0ubuntu13

Replaces: belocs-locales-bin, libc6-i386

Provides: glibc-2.13-1, libc6-i686

Depends: libc-bin (= 2.13-0ubuntu13), libgcc1, tzdata

Suggests: glibc-doc, debconf | debconf-2.0, locales

Conflicts: belocs-locales-bin, libc6-i686, prelink (<< 0.0.20090925), tzdata (<< 2007k-1), tzdata-etch

Breaks: nscd (<< 2.13)

Filename: pool/main/e/eglibc/libc6_2.13-0ubuntu13_i386.deb

Size: 3764596

MD5sum: 1cfb03baf7c299fcf266f1c9b20c00a5

SHA1: 2f2d25e96ae7a8f9489a460154ffc31460b2dead

SHA256: c3336e5b6480591925974be5329eaa56a5632697eeb4a75de52905b3efd65e81

Description-zh_CN: Embedded GNU C Library: Shared libraries

本软件包包含了系统中几乎所有程序都会用到的标准运行库,包括标准 C 语言共享库和标准数学 库,以及许多其它的运行库。

Multi-Arch: same



Origin: Ubuntu

Supported: 18m

Task: minimal


3 发行版无关方法:

(1) 查看ldd –version的输出结果:

wzw@wzw-Lenovo:~$ ldd –version

ldd (Ubuntu EGLIBC 2.13-0ubuntu13) 2.13

版权所有 (C) 2011 Free Software Foundation, Inc.


由 Roland McGrath 和 Ulrich Drepper 编写。


(2) 编译执行如下程序:



int main(void)


puts(gnu_get_libc_version ());

return 0;


wzw@wzw-Lenovo:~$ ./a.out




已标记关键词 清除标记
©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页