CentOS system updates Python

Source: Internet
Author: User

The Server I use now is CentOS release 5.4 (Final), but Python is still 2.4.3, which is relatively low. I always want to update it. The last time Python was forcibly uninstalled, yum and some basic commands could not be used. Therefore, do not uninstall the old version. The new and old versions can coexist.


I found some materials in several foreign forums and executed the following command to install Python 2.6:


$ Rpm-Uvh http://yum.chrislea.com/centos/5/i386/chl-release-5-3.noarch.rpm
$ Rpm -- import/etc/pki/rpm-gpg/RPM-GPG-KEY-CHL
$ Rpm-Uvh http://download.Fedora.RedHat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm
$ Yum install libffi
$ Yum install python26

The result is as follows:
$ Python26
Python 2.6.2 (r262: 71600, Sep 8 2009, 13:06:43)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-44)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>

This also encountered an error:
Python26-2.6.2-2.i386 from chlorophyll has depsolving problems
--> Missing Dependency: libffi. so.5 is needed by package python26-2.6.2-2.i386)
Error: Missing Dependency: libffi. so.5 is needed by package python26-2.6.2-2.i386 (chlorophyll)

This is because there is no libffi on which the installation program depends. After you run the 3rd and 4th lines of commands to install libffi, the problem is solved.
 

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.