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
저는 파이썬을 별로 좋아하지 않습니다. 그렇다면 왜 이런 일이 발생하며 어떻게 해결합니까? 배포 버그인가요?
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가 나에게 알아내라고 지시한 대로, 문제는 libxml2.so의 항목이 /etc/ld.so.conf.d/
내가 실제로 가질 것으로 예상했던 라이브러리 외에 자체 버전의 libxml2.so가 있는 디렉토리를 가리킨다는 것입니다. 버전 비호환성은 Python 관련 프로세스가 실패하는 이유입니다.