[步骤] Linux glibc 软件版本的检查

内容一:glibc 软件的作用

glibc 软件包含了很多其他软件 (例如:OpenShift 和 MySQL 等等) 需要使用的标准库。

内容二:glibc 软件的特点

glibc 是 Linux 系统自带的软件,直接在系统上更换此软件可能导致 Linux 系统崩溃。
不同的软件版本要求的 glibc 软件版本不一样。
glibc 新版本可以兼容旧版本,但是需要使用新版本 glibc 的软件无法在只有旧版本 glibc 的系统上运行。

内容三:glibc 软件的使用案例

Red Hat Enterprise Linux 7 使用的 glibc 版本是 2.17
Red Hat Enterprise Linux 8 使用的 glibc 版本是 2.28
Red Hat Enterprise Linux 9 使用的 glibc 版本是 2.34

内容四:glibc 软件的检查

4.1 使用 ldd 命令检查

$ 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.

(补充:从这里的输出结果可以看出,目前的 glibc 软件版本是 2.28)

4.2 通过 rpm 命令检查

$ rpm -qa | grep glibc
glibc-2.28-251.el8_10.53.x86_64
glibc-devel-2.28-251.el8_10.53.x86_64
glibc-common-2.28-251.el8_10.53.x86_64
glibc-headers-2.28-251.el8_10.53.x86_64
glibc-langpack-en-2.28-251.el8_10.53.x86_64
glibc-gconv-extra-2.28-251.el8_10.53.x86_64

(补充:从这里的输出结果可以看出,目前的 glibc 软件版本是 2.28)