centos7安装python3的虚拟环境

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_35399846/article/details/79451396

错误:/usr/local/python36/bin/python3.6: error while loading shared libraries: libpython3.6m.so.1.0: cannot open shared object file: No such file or directory

解决:

# cd  /etc/ld.so.conf.d
# vim python3.conf
# ls

dyninst-x86_64.conf                    mysql-x86_64.conf
kernel-3.10.0-693.2.2.el7.x86_64.conf  tix-x86_64.conf
kernel-3.10.0-693.el7.x86_64.conf

# vim python3.conf
#在python3.conf文件里面输入 /usr/local/python3/lib 然后保存并退出
# ldconfig
# python
Python 3.6.3 (default, Mar  5 2018, 21:22:53) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-16)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> quit()
[root@iZ3k4aqjj2qsx9Z ld.so.conf.d]# 

猜你喜欢

转载自blog.csdn.net/qq_35399846/article/details/79451396