gpt4 book ai didi

linux - ImportError :/usr/local/lib/python3. 7/site-packages/P4API.cpython-37m-x86_64-linux-gnu.so: undefined symbol: SSL_library_init

转载 作者:太空狗 更新时间:2023-10-29 12:09:02 28 4
gpt4 key购买 nike

**

*File "/usr/local/lib/python3.7/site-packages/P4.py", line 410, in <module>
import P4API
ImportError: /usr/local/lib/python3.7/site-packages/P4API.cpython-37m-x86_64-linux-gnu.so: undefined symbol: SSL_library_init*

**

我在运行 docker 容器和安装 p4python 以连接 Perforce 服务器时遇到上述错误。在 Debian 镜像上安装 p4python 失败。所以我现在尝试了 CentOS。在日志中说包已安装。我遇到这个问题有一段时间了,但我通过在线找到正确版本的 P4API.cpp 并手动放置它在 Windows 上解决了它。

在 docker 构建期间安装 p4python 时的日志说:

*Building wheels for collected packages: p4python, SQLAlchemy, pycparser
Building wheel for p4python (setup.py): started
Building wheel for p4python (setup.py): finished with status 'done'*

perforce 论坛最近有一个关于这个的问题,但没有解决方案。 https://forums.perforce.com/index.php?/topic/5933-p4python-undefined-symbol-ssl-library-init/

关于如何解决这个问题有什么建议吗?

最佳答案

我也遇到过这种问题。

起初我检查了P4API使用的libssl.so版本:

ldd/home/someuser/.local/lib/python3.5/site-packages/P4API.cpython-35m-x86_64-linux-gnu.so

我意识到 P4API 指向 libssl.so.1.1,这对于 Perforce API 来说太高了。如 documentation's OpenSSL Compatibility 中所述您最多可以使用 1.0.2k+

我使用以下方法在 Debian 9 上安装了 libssl 1.0.2:

sudo apt-get install libssl1.0.2

并通过链接指向该版本以进行全新安装:

ln -s /usr/lib/x86_64-linux-gnu/libssl.so.1.0.2 /some/path/libssl.so
pip3 uninstall p4python
pip3 install --install-option="--ssl" --install-option="/some/path/" p4python

其中 /some/path/ 指的是您要将库链接到的位置。

关于linux - ImportError :/usr/local/lib/python3. 7/site-packages/P4API.cpython-37m-x86_64-linux-gnu.so: undefined symbol: SSL_library_init,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55042317/

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