Centos升级glibc问题盘点

Centos升级glibc问题盘点

[!WARNING]

升级glibc遇到问题比较严重,升级前后注意不要关闭当前升级的窗口!

切记,切记,切记!

首先看下升级前的glibc版本,可以看出升级前glibc版本最高为2.17

[root@localhost lib64]# strings /lib64/libc.so.6 | grep GLIBC
GLIBC_2.2.5
GLIBC_2.2.6
GLIBC_2.3
GLIBC_2.3.2
GLIBC_2.3.3
GLIBC_2.3.4
GLIBC_2.4
GLIBC_2.5
GLIBC_2.6
GLIBC_2.7
GLIBC_2.8
GLIBC_2.9
GLIBC_2.10
GLIBC_2.11
GLIBC_2.12
GLIBC_2.13
GLIBC_2.14
GLIBC_2.15
GLIBC_2.16
GLIBC_2.17
GLIBC_PRIVATE

以升级2.25版本为例,

需要关注下这几个链接(/usr/lib64文件夹下):

[root@localhost lib64]# ls -l | grep 2.17.so | grep '>'
lrwxrwxrwx.  1 root root     10 1月  27 12:07 ld-linux-x86-64.so.2 -> ld-2.17.so
lrwxrwxrwx.  1 root root     14 1月  27 11:05 libanl.so.1 -> libanl-2.17.so
lrwxrwxrwx.  1 root root     23 1月  27 12:29 libBrokenLocale.so.1 -> libBrokenLocale-2.17.so
lrwxrwxrwx.  1 root root     15 1月  27 11:05 libcidn.so.1 -> libcidn-2.17.so
lrwxrwxrwx.  1 root root     16 1月  27 11:05 libcrypt.so.1 -> libcrypt-2.17.so
lrwxrwxrwx.  1 root root     19 1月  27 12:08 libc.so.6 -> /lib64/libc-2.17.so
lrwxrwxrwx.  1 root root     13 1月  27 12:27 libdl.so.2 -> libdl-2.17.so
lrwxrwxrwx.  1 root root     12 1月  27 12:28 libm.so.6 -> libm-2.17.so
lrwxrwxrwx.  1 root root     14 1月  27 11:05 libnsl.so.1 -> libnsl-2.17.so
lrwxrwxrwx.  1 root root     21 1月  27 11:05 libnss_compat.so.2 -> libnss_compat-2.17.so
lrwxrwxrwx.  1 root root     17 1月  27 11:05 libnss_db.so.2 -> libnss_db-2.17.so
lrwxrwxrwx.  1 root root     18 1月  27 11:05 libnss_dns.so.2 -> libnss_dns-2.17.so
lrwxrwxrwx.  1 root root     20 1月  27 11:05 libnss_files.so.2 -> libnss_files-2.17.so
lrwxrwxrwx.  1 root root     21 1月  27 11:05 libnss_hesiod.so.2 -> libnss_hesiod-2.17.so
lrwxrwxrwx.  1 root root     22 1月  27 11:05 libnss_nisplus.so.2 -> libnss_nisplus-2.17.so
lrwxrwxrwx.  1 root root     18 1月  27 11:05 libnss_nis.so.2 -> libnss_nis-2.17.so
lrwxrwxrwx.  1 root root     18 1月  27 11:05 libpthread.so.0 -> libpthread-2.17.so
lrwxrwxrwx.  1 root root     17 1月  27 11:05 libresolv.so.2 -> libresolv-2.17.so
lrwxrwxrwx.  1 root root     13 1月  27 11:05 librt.so.1 -> librt-2.17.so
lrwxrwxrwx.  1 root root     15 1月  27 11:05 libutil.so.1 -> libutil-2.17.so

如果升级失败的话,部分链接会指向升级后的2.25版本,这时需要使用sln命令将其指向原来的版本即可

#这里以libdl.so.2举例
sudo sln libdl-2.17.so libdl.so.2

[!IMPORTANT]

升级失败会遇到的问题点:

  • 所有命令都无法使用,relocation error: /lib64/libpthread.so.0: symbol __libc_vfork version GLIBC_PRIVATE not defined in file libc.so.6 with link time reference
  • 远程连接无法使用 connection reset by remote server
  • 如果部分修复的话,部分命令会出现/lib64/libc.so.6: version GLIBC_2.17 not found
posted @   boydenyol  阅读(33)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· 上周热点回顾(2.24-3.2)
点击右上角即可分享
微信分享提示