Reference Original: http://blog.csdn.net/jcjc918/article/details/11022345
The Python2.6.6 is pre-installed in the VPS and upgraded to 2.7
Upgrade steps:
#View the version of PythonPython-V#Download Python-2.7.3wget http://python.org/ftp/python/2.7.3/python-2.7.3. Tar.bz2#UnzipTAR-JXVF python-2.7.3. Tar.bz2#Change Working directoryCD python-2.7.3#installation./configuremake allmake installmake cleanmake Distclean#View version Information/usr/Local/bin/python2.7-V#establish a soft connection so that the system default Python points to python2.7Mv/usr/bin/python/usr/bin/python2.6.6LN-s/usr/Local/bin/python2.7/usr/bin/python#re-test python versionPython-v
After the system Python soft links point to the Python2.7 version, because Yum is not compatible with Python 2.7, Yum does not work properly and we need to specify the Python version of Yum
Vi/usr/bin/yum
The file header is
#!/usr/bin/python
Change into
#!/usr/bin/python2.6.6
Centos 6.4 Python 2.6 upgrade to 2.7