Compile and install centos5.8 under the python2.7.8 several times, every few hours, not compiled. Too annoying, instead of the Yum installation, version is 2.6.8, one minute to fix.
Reprinted from Http://blog.slogra.com/post-235.html
System: CentOS 5.8
Required Packages: epel-release-5-4.noarch.rpm
1. View the current Python version
[Email protected] ~]# python-v
Python 2.4.3
You can see that the current version of Python is 2.4.3
2. Install the Epel RPM package
RPM-IVH http://download.slogra.com/epel-release-5-4.noarch.rpm
3.yum Upgrade Python
Yum-y Install python26 Some tutorials to first Yum installation Libffi, in fact, no, directly installed Python26 will automatically install Libffi.
4. Back up the old Python version and use the new Python version
Mv/usr/bin/python/usr/bin/python.old
Ln-s/usr/bin/python26/usr/bin/python
5. Check Python version
[Email protected] ~]# python-v
Python 2.6.8
You can see that the version is already 2.6.8. It's not over yet. Upgrading Python will cause Yum to be unusable.
6. Solving Yum Problems
Vi/usr/bin/yum
Add the first line of Python with 2.4, that is, the first line to read:
#!/usr/bin/python2.4
This way Yum still runs in the Python 2.4 environment.
CentOS compiler installation Python is too slow to use Yum to install.