Linux python2.4 dependencies on Python upgrades and software installation

Source: Internet
Author: User
Tags bz2 ftp linux

The Python upgrade:

***************************************************************************************************************

1. View the Python version

(1). [Root@localhost ~]# Python-v

Python 2.4.3

So centos the default Python is 2.4.3, you need to upgrade python2.4 to version 2.6.

2. Download python2.6.7.tar.bz2

http://www.python.org/ftp/python/2.6.7/Python-2.6.7.tar.bz2

Installation:

(1). $tar JXVF python2.6.7.tar.bz2

(2). $CD Python2.6.7

(3). $./configure

(4). $make && Make Install

Since then, the python2.6 installation path defaults to the/usr/local/lib/python2.6

View Python version:

$ python--version (-V)

3. Establish a soft connection so that the system's default Python points to python2.6

Normally, even if the python2.6 installation is successful, the system's default pointing Python is still 2.4.3, considering that Yum is based on python2.4.3 to work properly and is not easy to uninstall.

How do you point the system's default Python to version 2.6?

(1) Mv/usr/bin/python/usr/bin/python.bak (created by oneself)

(2) Ln-s/usr/local/bin/python2.6/usr/bin/python

Verify that the Python point is successful:

Ll/usr/bin/python

Python-v

Back to the column page: http://www.bianceng.cnhttp://www.bianceng.cn/Programming/extra/

*************************************************************************************************************** *******

The dependency problem of python2.4

*************************************************************************************************************** *******

When installing software or system update software, the system complains: you need to rely on python2.4 because your system has a Python version too high or your Python has been updated to a newer version

Workaround: Reinstall python2.4

Detailed steps are as follows:

# CD/USR

# wget Http://www.python.org/ftp/python/2.4.1/Python-2.4.1.tgz

# TAR-ZXVF Python-2.4.1.tgz

# CD Python-2.4.1

#./configure-prefix=/usr/local/python-2.4.1

# make

# make Install

# mv/usr/bin/python/usr/bin/python-2.4.1

# ln-s/usr/local/python-2.4.1/bin/python/usr/bin/python

The ok,python2.4 installation is complete.

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.