CentOS 5.4 How to make Python 2.6 RPM Package

Source: Internet
Author: User

For some reason, CentOS 5.4, the default Python version is still 2.4. But Python is very important in CentOS, but the 2.4 version of Python has many modules, and the latest version of Python 2.6 adds a lot of advanced features. Therefore, it is necessary to upgrade.

There are many ways to upgrade, one is direct rpm, there is a source code way, the source code is really good, but trouble Ah, but also to compile, quite troublesome.

I searched the internet for a way to create a Python 2.6 rpm package under CentOS 5.4, close-up


1. Download the source code on the 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 compiling

Rpmbuild-ba Python-2.6.spec



3. After waiting for a long wait, there is a compiled RPM package in the RPM folder.

Source code installation method, old steps, will not speak of.

CentOS 5.4 How to make Python 2.6 RPM Package

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.