How to Create a python 5.4 RPM package using centos 2.6

Source: Internet
Author: User

I don't know why. centos 5.4 is used. The default Python version is 2.4. however, python is very important in centos, but Python 2.4 does not have many modules. The latest Python 2.6 version adds many advanced features. therefore, it is necessary to upgrade.

There are many ways to upgrade, one is to directly rpm, and the other is the source code method. The source code is indeed good, but it is troublesome and requires compilation, which is quite troublesome.

On the Internet, I found out how to create an RPM package for python 5.4 Under centos 2.6.

1. Download the source code from the official website.

CD/usr/src/rehat/sources
Wget http://www.python.org/ftp/python/2.6.5/Python-2.6.5.tar.bz2
Tar jxvf Python-2.6.5.tar.bz2
CP Python-2.6.5/MISC/RPM/python-2.6.spec ../specs
Rm-RF Python-2.6.5
CD ../specs

2. Start Compilation

Rpmbuild-Ba python-2.6.spec

3. After a long wait, there will be a compiled RPM package in the RPM folder.

The method for installing source code is not described in the old steps.

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.