RH5.4 upgrade Python to version 2.7

Source: Internet
Author: User

1. Introduction

Because of the job requirements, the python under RH5.4 is now upgraded to version 2.7 (the default version is 2.4).

2. Upgrade Method

wget http://www.python.org/ftp/python/2.7.5/Python-2.7.5.tgz
Tar zxvf python-2.7.tgz
./configure
Make
Make install

Then view the software version

/usr/local/bin/python-v
Python 2.7

It appears that the new version is in effect, make a soft connection should be OK.
Mv/usr/bin/python/usr/bin/python.bak
Ln-s/usr/local/bin/python/usr/bin/python


Yum will not be available after the upgrade is installed because Yum is using version 2.4, so modify the Yum profile to be able to identify the python in version 2.4
Vim/usr/bin/yum
The head of the file
#!/usr/bin/python
Change into
#!/usr/bin/python2.4 now yum no problem ...


References: http://ju.outofmemory.cn/entry/10832


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.