技术解析
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:
/lib64/liblzma.so.5: undefined symbol: lzma_stream_footer_encode, version XZ_5.0
Please install a package which provides this module, or
verify that the module is installed correctly.
It's possible that the above module doesn't match the
current version of Python, which is:
2.7.5 (default, Aug 4 2017, 00:39:18)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-16)]
If you cannot solve this problem yourself, please go to
the yum faq at:
http://yum.baseurl.org/wiki/Faq
在服务器使用 yum 安装软件的时候 突然出现上面的错误 机器一开始确定是正常的 然后检查 /lib64/liblzma.so.5 以及源文件 /usr//lib64/liblzma.so.5.2.2 md5 值都发生了改变 正常 MD5:81615f916ede2689b4ff90b3524b6e20 /usr/lib64/liblzma.so.5.2.2 异常 md5: 3aee895ac421108f71735d78219f7a11 /usr/lib64/liblzma.so.5.2.2
stat 查看库文件的修改时间 没有任何问题 而且机器也没有被入侵过的痕迹:
# stat /usr/lib64/liblzma.so.5.2.2
File: ‘/usr/lib64/liblzma.so.5.2.2 ’
Size: 157424 Blocks: 320 IO Block: 4096 regular file
Device: fd01h/64769d Inode: 99093 Links: 1
Access: (0755/-rwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2017-12-11 20:38:32.134000000 +0800
Modify: 2016-11-05 23:27:57.000000000 +0800
Change: 2017-06-11 19:48:14.454000000 +0800
Birth: -
使用 rpm -V 验证 rpm 包完整性 也是提示该库 md5 不一致:
# rpm -V xz-libs
..5...... /usr/lib64/liblzma.so.5.2.2
我们运行的业务有 pptp xl2tp ipsec openvpn 有大佬有类似的经验吗 该如何排查 现在的情况 我拷贝一个 md5 正常的库回去 yum 就正常可用了
补充: 拷贝回去虽然正常可用 但是发现了这个日志
Jul 26 16:50:46 hosstname kernel: systemd-udevd[31072]: segfault at 30f0 ip 00000000000030f0 sp 00007ffffebdc1d8 error 14 in systemd-udevd[564a9bebf000+4b000]
Jul 26 16:50:46 hostname kernel: systemd-udevd[31073]: segfault at 30f0 ip 00000000000030f0 sp 00007ffffebdc1d8 error 14 in systemd-udevd[564a9bebf000+4b000]