CentOS默认默认Python版本是2.4.3,升级2.7.8步骤:
1. 下载Python-2.7.8.tgz
wget Python-2.7.8.tgz
2. 解压
tar zxvf Python-2.7.8.tgz
3. 安装
cd Python-2.7.8
./configure
make all
make install
make clean
make distclean
4. 替换python
mv /usr/bin/python /usr/bin/python2.4.3
mv /usr/local/python2.7 /usr/bin/python
5. 修改yum
打开vim /usr/bin/yum
将第一行#!/usr/bin/python
改为 #!/usr/bin/python2.4.3
保存后,yum使用正常了
阅读(1914) | 评论(0) | 转发(0) |