Linux python2.4升级到2.7
作者:互联网
yum install gcc-c++ gcc -y
mkdir /usr/local/python2.7
tar zxvf Python-2.7.11.tgz
cd Python-2.7.11/
./configure --prefix=/usr/local/python2.7
make && make install
mv /usr/bin/python /usr/bin/python.bak
ln -s /usr/local/python2.7.11/bin/python /usr/bin/python
验证,运行 python -V 查看版本
防止yum执行异常,修改yum使用的Python版本
vi /usr/bin/yum
将头部 #!/usr/bin/python 修改为 #!/usr/bin/python.bak
标签:bin,python,python2.4,Python,yum,usr,Linux,2.7 来源: https://www.cnblogs.com/liang545621/p/12605667.html