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
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