CentOS6默认的python2.6.6升级到python2.7.10

前端之家收集整理的这篇文章主要介绍了CentOS6默认的python2.6.6升级到python2.7.10前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

1.下载解压

wget http://www.python.org/ftp/python/2.7.10/Python-2.7.10.tgz

tar -zxvf Python-2.7.10.tgz

2.编译安装

cd Python-2.7.10

./configure --prefix=/usr/local/python2.7

make

make install

3.添加软连接和修改yum

mv /usr/bin/python /usr/bin/python2.6.6

ln -s /usr/local/python2.7/bin/python2.7 /usr/bin/python

vi /usr/bin/yum

#!/usr/bin/python 修改为 #!/usr/bin/python2.6.6

wq

原文链接:https://www.f2er.com/centos/379747.html

猜你在找的CentOS相关文章