CentOS compiler installation Python is too slow to use Yum to install.

Source: Internet
Author: User

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.