centos7安裝python3的虛擬環境
阿新 • • 發佈:2019-01-06
錯誤:/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()
[ [email protected] ld.so.conf.d]#