RHEL-Like
1 前言
一个问题,一篇文章,一出故事。
笔者每次在RHEL 5.1系统跑SOSRepo都会遇到如下错误,
Creating compressed archive... sh: error while loading shared libraries: /lib64/libc.so.6: ELF file OS ABI invalid sh: error while loading shared libraries: /lib64/libc.so.6: ELF file OS ABI invalid Traceback (most recent call last): File "/usr/sbin/sosreport", line 763, in ? sosreport() File "/usr/sbin/sosreport", line 752, in sosreport policy.packageResults() File "/usr/lib/python2.4/site-packages/sos/policyredhat.py", line 176, in packageResults fp = open(tarballName, "r") IOError: [Errno 2] No such file or directory: '/tmp/sosreport-ser01.tar.bz2'
2 最佳实践
2.1 载入旧库并确认链接库是否存在
LD_PRELOAD=/lib64/libc-2.5.so ls /lib64/libc.so.6
注:旧库文件名称为“/lib64/libc-2.5.so”
2.2 备份当前链接库
LD_PRELOAD=/lib64/libc-2.5.so mv /lib64/libc.so.6 /lib64/libc.so.6.bak
或者,可以直接删除,
LD_PRELOAD=/lib64/libc-2.5.so rm -f /lib64/libc.so.6
2.3 创建软链接修复此问题
LD_PRELOAD=/lib64/libc-2.5.so ln -s /lib64/libc-2.5.so /lib64/libc.so.6
参阅文档
========================
https://blog.51cto.com/u_314258/1704852
没有评论