Python3.5 installation fails: cannot open libpython3.5m.so.1.0

雨燕双飞 提交于 2019-12-12 12:47:11

问题


I'm trying to install Python 3.5.2 on CentOS 7. The build appears to succeed, but executing python3 elicits

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

I checked this question as the only link that appeared to help. ldd does show the file as missing, and it does not seem to exist anywhere, although /usr/lib/libpython3.5m.so exists.

By any chance, is /usr/lib/libpython3.5m.so the correct file? I have no problem making a link, but I don't want to shoot myself in the foot if it's wrong. I also wonder whether there are related layers of yak fur waiting for me. Perhaps I need to make clean and rebuild with other options?


回答1:


Much along the same lines as the quoted question, I still need to repair LD_LIBRARY_PATH. The global solution is at least a workaround:

export LD_LIBRARY_PATH=/usr/lib/

The problem was mostly in locating the wayward file.




回答2:


You should make it by ./configure --enable-shared then make && make install

after that, vim /etc/ld.so.conf.d/python3.conf && and add a new line /usr/local/lib try /sbin/ldconfig hope it works !



来源:https://stackoverflow.com/questions/38256696/python3-5-installation-fails-cannot-open-libpython3-5m-so-1-0

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!