centos7、centos8、rocky9、ubuntu22.04 gnu c库对比
001、centos7
[root@pc1 test01]# cat /etc/redhat-release ## 系统centos7 CentOS Linux release 7.6.1810 (Core) [root@pc1 test01]# ldd --version ## 利用ldd查询 ldd (GNU libc) 2.17 Copyright (C) 2012 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. Written by Roland McGrath and Ulrich Drepper. [root@pc1 test01]# strings /lib64/libc.so.6 | grep "^GLIBC" | sort -rV | head ## 利用strings查询 GLIBC_PRIVATE GLIBC_2.17 GLIBC_2.17 GLIBC_2.16 GLIBC_2.16 GLIBC_2.15 GLIBC_2.14 GLIBC_2.13 GLIBC_2.13 GLIBC_2.12

002、centos8
[root@localhost test01]# cat /etc/redhat-release ## 系统 CentOS Linux release 8.4.2105 [root@localhost test01]# ldd --version ##查看最高版本 ldd (GNU libc) 2.28 Copyright (C) 2018 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. Written by Roland McGrath and Ulrich Drepper. [root@localhost test01]# strings /lib64/libc.so.6 | grep "^GLIBC" | sort -rV | head ## 利用strings查询 GLIBC_PRIVATE GLIBC_2.28 GLIBC_2.28 GLIBC_2.27 GLIBC_2.26 GLIBC_2.26 GLIBC_2.25 GLIBC_2.25 GLIBC_2.24 GLIBC_2.23

003、rocky9
[root@PC1 test01]# cat /etc/redhat-release ## 系统版本rocky9.3 Rocky Linux release 9.3 (Blue Onyx) [root@PC1 test01]# ldd --version ## 利用ldd命令查询 ldd (GNU libc) 2.34 Copyright (C) 2021 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. Written by Roland McGrath and Ulrich Drepper. [root@PC1 test01]# strings /lib64/libc.so.6 | grep "^GLIBC" | sort -rV | head ## 利用strings查询 GLIBC_PRIVATE GLIBC_2.34 GLIBC_2.33 GLIBC_2.33 GLIBC_2.32 GLIBC_2.31 GLIBC_2.30 GLIBC_2.29 GLIBC_2.29 GLIBC_2.28

004、ubuntu 22.04中
root@liujiaxin001:~# lsb_release -a ## 查看系统 No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 22.04.4 LTS Release: 22.04 Codename: jammy root@liujiaxin001:~# ldd --version ## ldd查询 ldd (Ubuntu GLIBC 2.35-0ubuntu3.6) 2.35 Copyright (C) 2022 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. Written by Roland McGrath and Ulrich Drepper. root@liujiaxin001:~# ldd $(which top) | grep "libc.so" ## ldd 一个当前系统中c库编写的一个动态可执行程序,找出libc.so.6的位置 libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007bee60a00000) ## strings查询 root@liujiaxin001:~# strings /lib/x86_64-linux-gnu/libc.so.6 | grep "^GLIBC" | sort -rV | head -n 5 GLIBC_PRIVATE GLIBC_2.35 GLIBC_2.34 GLIBC_2.33 GLIBC_2.32

。

浙公网安备 33010602011771号