Python, 原创

解决Python shared libraries libpythonxx.so.1.0 cannot open shared object file

在centos上源码安装python3.6,整个安装过程没有错误,但运行python时提示 python error while loading shared libraries: libpython3.6m.so.1.0: cannot open shared object file: No such file or directory。

1.需要在编译的时候启用 –enable-shared, 如果不起用可能还有其他问题:Can’t connect to HTTPS URL because the SSL module is not available

2. 安装完成后需要将 libpython3.6m.so.1.0 放入到 lib库中,有人说是 /usr/lib 但因为操作系统是64位的需要放的位置是 /usr/lib64

例如:

sudo ln -s /usr/local/python3.6.5/lib/libpython3.6m.so.1.0 /usr/lib64/libpython3.6m.so.1.0

问题解决

(239)

Related Post