CentOS 7 Compile and install Python2.6.1__python

Source: Internet
Author: User

Compiling the installation steps is simple, as follows:

# wget https://www.python.org/ftp/python/2.6.1/Python-2.6.1.tgz
# tar zxvf python-2.6.1.tgz
# CD Python-2.6.1
#./configure--prefix=/usr/local--enable-shared
# make && make install

The following error message was encountered during compilation:

Gcc-pthread-c-fno-strict-aliasing-dndebug-g-fwrapv-o3-wall-wstrict-prototypes
  -I.-iinclude-i./include   -dpy_build_core-dsvnversion=\ "' Lc_all=c svnversion. '"-
  o modules/getbuildinfo.o./modules/getbuildinfo.c

gcc:error:directory ": No such file or directory make
: * * * [MODULES/GETBUILDINFO.O] Error 1

This is a bug in configure that modifies the generated makefile file and finds the following:

cc=     gcc-pthread
cxx=        g++-pthread maincc= $ (     CC)
linkcc=     $ (PURIFY) $ (MAINCC)
ar=     AR
ranlib=     ranlib
svnversion= svnversion $ (srcdir)

Change the last line's svnversion variable value to empty, and then make && make install again
Svnversion= ""

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.