下载新版本的python
1: wget解压缩 以及编译
1: tar xvf Python-2.7.tgz 2: cd Python-2.7 3: ./configure --prefix=/usr/local/python2.7 4: make 5: make install覆盖原来的python链接
1: mv /usr/bin/python /usr/bin/python_old 2: ln -s /usr/local/python2.7/bin/python /usr/bin/ 3: python Python 2.7 (r27:82500, May 31 2013, 19:07:21) [GCC 4.1.2 20080704 (Red Hat 4.1.2-52)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>>修复YUM无法使用的问题
1: vim /usr/bin/yum 2: 替换#!/usr/bin/python 为#!/usr/bin/python2.4