Linux升级lib64中的libc.so.6导致所有命令失效

ls: relocation error: libpthread.so.0: symbol __libc_dl_error_tsd, version GLIBC_PRIVATE not defined in file libc.so.6 with link time reference

升级Glibc后出现所有shell命令都不可用

复制代码
# systemctl status
systemctl: relocation error: /lib64/libpthread.so.0: symbol __libc_vfork version GLIBC_PRIVATE not defined in file libc.so.6 with link time reference
# systemctl status kubelet
systemctl: relocation error: /lib64/libpthread.so.0: symbol __libc_vfork version GLIBC_PRIVATE not defined in file libc.so.6 with link time reference
# ps
ps: relocation error: /lib64/libpthread.so.0: symbol __libc_vfork version GLIBC_PRIVATE not defined in file libc.so.6 with link time reference
# ps -elf
ps: relocation error: /lib64/libpthread.so.0: symbol __libc_vfork version GLIBC_PRIVATE not defined in file libc.so.6 with link time reference
# ls
ls: relocation error: /lib64/libpthread.so.0: symbol __libc_vfork version GLIBC_PRIVATE not defined in file libc.so.6 with link time reference

解决方法

原因是因为升级过程删除了soft link

此时,sln命令还是可以用的

复制代码
# sln /usr/lib64/libc-2.28.so /lib64/libc.so.6 
# sln /usr/lib64/ld-2.28.so /usr/lib64/ld-linux-x86-64.so.2

系统恢复正常

复制代码
# ps
  PID TTY          TIME CMD
19214 pts/12   00:00:00 ps
30545 pts/12   00:00:01 bash
相关推荐
W说编程42 分钟前
Linux与量子计算:面向未来的架构演进
linux·服务器·性能优化·架构·系统架构·量子计算
什么半岛铁盒2 小时前
Linux进程异常退出排查指南
linux·运维·服务器
wu~9702 小时前
计算机网络自定向下:第二章复习
服务器·网络·架构
Mylvzi3 小时前
Linux 性能利器:详解 `top` 命令的使用与输出信息解析
linux·服务器·网络
lyh13443 小时前
【Ubuntu崩溃修复】
linux·运维·服务器
_可乐无糖6 小时前
EC2安装WebRTC sdk-c环境、构建、编译
服务器·webrtc·aws
倔强的石头1066 小时前
【Linux指南】用户与系统基础操作
linux·运维·服务器
好多知识都想学6 小时前
Centos 7 服务器部署多网站
linux·服务器·centos
藥瓿亭7 小时前
K8S认证|CKS题库+答案| 10. Trivy 扫描镜像安全漏洞
linux·运维·服务器·云原生·容器·kubernetes·cks
leo__5208 小时前
在Ubuntu中设置开机自动运行(sudo)指令的指南
服务器·ubuntu·postgresql