php glibc,glibc、libc和glib详解 ldd命令查看依赖

一、什么是glibc、libc和glib

glibc是linux的GUN C函数库,是linux系统中最底层的API,几乎其它任何运行时库都依赖于glibc。glibc除了封装linux操作系统所提供的系统服务,它本身也提供了许多其它必要功能服务的实现,例如:动态加载模块libdl、实时扩展接口librt。

glibc安装:yum install glibc安装动态版本库,yum install glibc-static安装静态版本库。

libc是Linux下的ANSI C函数库,被glibc包含,一般只包括以下功能:

libc位于/usr/lib64/libc.so、/usr/lib64/libc.a。

glib是Linux下C的一些工具库,和glibc没有关系。

查看glibc版本:

方法一:

[root@ebs-19233 ~]# /lib/libc.so.6

GNU C Library stable release version 2.12, by Roland McGrath et al.

Copyright (C) 2010 Free Software Foundation, Inc.

This is free software; see the source for copying conditions.

There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A

PARTICULAR PURPOSE.

Compiled by GNU CC version 4.4.7 20120313 (Red Hat 4.4.7-11).

Compiled on a Linux 2.6.32 system on 2015-05-27.

Available extensions:

The C stubs add-on version 2.1.2.

crypt add-on version 2.1 by Michael Glad and others

GNU Libidn by Simon Josefsson

Native POSIX Threads Library by Ulrich Drepper et al

BIND-8.2.3-T5B

RT using linux kernel aio

libc ABIs: UNIQUE IFUNC

For bug reporting instructions, please see:

.

方法二:

[root@ebs-19233 ~]# ldd  --version

ldd (GNU libc) 2.12

Copyright (C) 2010 Free Software Foundation, Inc.

This is free software; see the source for copying conditions.  There is NO

warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

由 Roland McGrath 和 Ulrich Drepper 编写。

ldd命令查看动态库或者可执行文件的依赖动态链接库,可以用于解决动态库缺失问题。

[root@ebs-19233 ~]# ldd /bin/sh

linux-vdso.so.1 =>  (0x00007fffc7361000)

libtinfo.so.5 => /lib64/libtinfo.so.5 (0x0000003207c00000)

libdl.so.2 => /lib64/libdl.so.2 (0x00007fcdec97b000)

libc.so.6 => /lib64/libc.so.6 (0x00007fcdec5e6000)

/lib64/ld-linux-x86-64.so.2 (0x00007fcdecb89000)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值