升级python cd /home/sanlang/tools wget Http://www.Python.org/ftp/python/2.7.6/Python-2.7.6.tgz gunzip Python-2.7.6.tgz
升级python
cd /home/sanlang/tools
wget Http://www.Python.org/ftp/python/2.7.6/Python-2.7.6.tgz
gunzip Python-2.7.6.tgz
tar xf Python-2.7.6.tar
cd Python-2.7.6
mkdir -p /application/python2.7.6
./configure --prefix=/application/python2.7.6 --enable-shared
make && make install
mv /usr/bin/python /usr/bin/python_old
ln -s /application/python2.7.6/bin/python2.7 /usr/bin/python
升级python导致yum不可用,解决办法
错误1
[root@sanlang Python-2.7.6]# yum -y install lrzsz
/usr/bin/python: error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No such file or directory
解决办法:
vim /usr/bin/yum
#!/usr/bin/python 改成 /usr/bin/python_old
错误2
[root@osanlang bin]# python -V
python: error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No such file or directory
解决办法:
echo "/application/python2.7.6/lib">>/etc/ld.so.conf
ldconfig
python -V
--结束END--
本文标题: linux下升级python2.0到py
本文链接: https://lsjlt.com/news/187888.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
2024-03-01
2024-03-01
2024-03-01
2024-03-01
2024-03-01
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0