gpt4 book ai didi

python - pip3 抛出 undefined symbol : XML_SetHashSalt

转载 作者:行者123 更新时间:2023-12-04 00:54:50 25 4
gpt4 key购买 nike

我在 oracle Linux EL7 上有 python 3.6.8
我安装了 pip3 使用

yum install python36-pip
但是,当我调用 pip3 时,它会出现库错误
pip3

Traceback (most recent call last):
File "/bin/pip3", line 8, in <module>
from pip import main
File "/usr/lib/python3.6/site-packages/pip/__init__.py", line 42, in <module>
from pip.utils import get_installed_distributions, get_prog
File "/usr/lib/python3.6/site-packages/pip/utils/__init__.py", line 27, in <module>
from pip._vendor import pkg_resources
File "/usr/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 35, in <module>
import plistlib
File "/usr/lib64/python3.6/plistlib.py", line 65, in <module>
from xml.parsers.expat import ParserCreate
File "/usr/lib64/python3.6/xml/parsers/expat.py", line 4, in <module>
from pyexpat import *
ImportError: /usr/lib64/python3.6/lib-dynload/pyexpat.cpython-36m-x86_64-linux-gnu.so: undefined symbol: XML_SetHashSalt

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/bin/pip3", line 12, in <module>
from pip._internal import main
File "/usr/lib/python3.6/site-packages/pip/__init__.py", line 42, in <module>
from pip.utils import get_installed_distributions, get_prog
File "/usr/lib/python3.6/site-packages/pip/utils/__init__.py", line 27, in <module>
from pip._vendor import pkg_resources
File "/usr/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 35, in <module>
import plistlib
File "/usr/lib64/python3.6/plistlib.py", line 65, in <module>
from xml.parsers.expat import ParserCreate
File "/usr/lib64/python3.6/xml/parsers/expat.py", line 4, in <module>
from pyexpat import *
ImportError: /usr/lib64/python3.6/lib-dynload/pyexpat.cpython-36m-x86_64-linux-gnu.so: undefined
symbol: XML_SetHashSalt
我试图看看是否有任何替代 pyexpat.*.so 但似乎没有
下面最后一行的 ldd 是输出
[root@whf00jkd python3.6]# ldd  /usr/lib64/python3.6/lib-dynload/pyexpat.cpython-36m-x86_64-linux-gnu.so
linux-vdso.so.1 => (0x00007ffd76bf9000)
libexpat.so.1 => /scratch/oraofss/app/oraofss/product/18.0.0/client_1/lib/libexpat.so.1 (0x00007fec3a94a000)
libpython3.6m.so.1.0 => /lib64/libpython3.6m.so.1.0 (0x00007fec3a422000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fec3a206000)
libc.so.6 => /lib64/libc.so.6 (0x00007fec39e38000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007fec39c34000)
libutil.so.1 => /lib64/libutil.so.1 (0x00007fec39a31000)
libm.so.6 => /lib64/libm.so.6 (0x00007fec3972f000)
/lib64/ld-linux-x86-64.so.2 (0x00007fec3ad81000)
我搜索了 libexpat.so.1
[root@whf00jkd python3.6]# whereis libexpat.so.1
libexpat.so: /usr/lib/libexpat.so.1 /usr/lib/libexpat.so /usr/lib64/libexpat.so.1 /usr/lib64/libexpat.so
[root@whf00jkd python3.6]# ls -ltr /usr/lib/libexpat.so.1
lrwxrwxrwx. 1 root root 17 Apr 1 2019 /usr/lib/libexpat.so.1 -> libexpat.so.1.6.0
[root@whf00jkd python3.6]# ls -ltr /usr/lib64/libexpat.so.1
lrwxrwxrwx. 1 root root 17 Apr 1 2019 /usr/lib64/libexpat.so.1 -> libexpat.so.1.6.0
并添加了一个链接 libexpat.so.1 ->/usr/lib/libexpat.so.1
在/usr/lib64/python3.6/lib-dynload/但这并没有消除错误
请帮忙

最佳答案

libexpat.so.1 指向错误的位置修复它
导出 LD_LIBRARY_PATH=/lib64/:$PATH

ldd /usr/lib64/python3.6/lib-dynload/pyexpat.cpython-36m-x86_64-linux-gnu.so
linux-vdso.so.1 => (0x00007fff073f1000)
libexpat.so.1 => /lib64/libexpat.so.1 (0x00007f9ba53ce000)
libpython3.6m.so.1.0 => /lib64/libpython3.6m.so.1.0 (0x00007f9ba4ea9000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f9ba4c8d000)
libc.so.6 => /lib64/libc.so.6 (0x00007f9ba48bf000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f9ba46bb000)
libutil.so.1 => /lib64/libutil.so.1 (0x00007f9ba44b8000)
libm.so.6 => /lib64/libm.so.6 (0x00007f9ba41b6000)
/lib64/ld-linux-x86-64.so.2 (0x00007f9ba5807000)

关于python - pip3 抛出 undefined symbol : XML_SetHashSalt,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63414448/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com