在 CentOS 7 机器上,我得到:
ABRT has detected 1 problem(s). For more info run: abrt-cli list --since 1641301975
[root@my_machine ~]# abrt-cli list --since 1641301975
id 4955357a1d46487319097d672270c4680d0722f4
reason: libxml2.py:1:<module>:ImportError: /usr/lib64/python2.7/site-packages/libxml2mod.so: symbol xmlLsCountNode, version LIBXML2_2.4.30 not defined in file libxml2.so.2 with link time reference
time: Tue 27 Apr 2021 07:52:58 AM IDT
cmdline: /usr/bin/python -Es /usr/sbin/setroubleshootd -f ''
uid: 995
count: 8489
Directory: /var/spool/abrt/Python-2021-04-27-07:52:58-4894
Reported: cannot be reported
如果我尝试自己运行它,就会发生这种情况:
# /usr/bin/python -Es /usr/sbin/setroubleshootd -f ''
Traceback (most recent call last):
File "/usr/sbin/setroubleshootd", line 99, in <module>
from setroubleshoot.server import RunFaultServer
File "/usr/lib64/python2.7/site-packages/setroubleshoot/server.py", line 70, in <module>
from setroubleshoot.analyze import (PluginReportReceiver,
File "/usr/lib64/python2.7/site-packages/setroubleshoot/analyze.py", line 40, in <module>
from setroubleshoot.avc_audit import *
File "/usr/lib64/python2.7/site-packages/setroubleshoot/avc_audit.py", line 39, in <module>
from setroubleshoot.audit_data import *
File "/usr/lib64/python2.7/site-packages/setroubleshoot/audit_data.py", line 44, in <module>
from setroubleshoot.xml_serialize import *
File "/usr/lib64/python2.7/site-packages/setroubleshoot/xml_serialize.py", line 45, in <module>
import libxml2
File "/usr/lib64/python2.7/site-packages/libxml2.py", line 1, in <module>
import libxml2mod
ImportError: /usr/lib64/python2.7/site-packages/libxml2mod.so: symbol xmlLsCountNode, version LIBXML2_2.4.30 not defined in file libxml2.so.2 with link time reference
我不太喜欢Python。那么,为什么会发生这种情况以及如何解决它?这是一个分发错误吗?
我尝试安装 libxml 和 libxml-dev,但没有效果。
附加信息:
# ldd /usr/lib64/python2.7/site-packages/libxml2mod.so
linux-vdso.so.1 => (0x00007ffd63df6000)
libxml2.so.2 => /usr/local/ge/opt/mc3/mc3lib/libxml2.so.2 (0x00007f03d24c1000)
libz.so.1 => /home/intel-oneAPI-2021/oneapi/compiler/2021.1.1/linux/lib/oclfpga/host/linux64/lib/libz.so.1 (0x00007f03d22a4000)
liblzma.so.5 => /lib64/liblzma.so.5 (0x00007f03d207e000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f03d1e62000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f03d1c5e000)
libutil.so.1 => /lib64/libutil.so.1 (0x00007f03d1a5b000)
libm.so.6 => /lib64/libm.so.6 (0x00007f03d1759000)
libpython2.7.so.1.0 => /lib64/libpython2.7.so.1.0 (0x00007f03d138d000)
libc.so.6 => /lib64/libc.so.6 (0x00007f03d0fbf000)
/lib64/ld-linux-x86-64.so.2 (0x00007f03d2973000)
答案1
正如 @Alex 指示我弄清楚的那样,问题是 in 中的一个条目/etc/ld.so.conf.d/
指向一个目录,该目录除了我实际上期望它拥有的库之外,还有它自己的 libxml2.so 版本。版本不兼容是导致Python相关进程失败的原因。