python3: error while loading shared libraries: libpython3.5m.so.1.0: cannot open shared object file: No such file or directory

安装python3遇到报错:

wget https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tgz

./configure --prefix=/usr/local/Python-3.5.2 --enable-shared
make
make install
ln -s /usr/local/Python-3.5.2/bin/python3 /usr/bin/python3
 
遇到报错:
python3: error while loading shared libraries: libpython3.5m.so.1.0: cannot open shared object file: No such file or directory
解决:
查看动态库情况
ldd /usr/local/Python-3.5.2/bin/python3
源码目录复制过去
cp libpython3.5m.so.1.0 /usr/lib/
上一篇:调用python脚本报错/usr/bin/env: python : No such file or directory


下一篇:Popover 弹出框 设置top,显示有时是向下的,解决方式