需求:python 2.6.6升级到python 2.7.9
tar xf Python-2.7.9.tgz
cd Python-2.7.9
./configure
make all
make install
make clean
make distclean
按装后python -V 查看当前版本还是python 2.6.6
mv /usr/bin/python /usr/bin/python2.6.6
ln -s /usr/local/bin/python2.7 /usr/bin/python
查看版本是python 2.7.9
此时yum不能正常使用,需要做调整
vim /usr/bin/yum
将文件头部的
#!/usr/bin/python
改成
#!/usr/bin/python2.6.6
原文地址:http://15940100544.blog.51cto.com/1882874/1618715