centos 编译安装python2.7

2020-01-10 10:42:51 浏览数 (1)

  1. 在后面使用和安装pip时说缺少zlib库,于是,先下载zlib zlib-1.2.8.tar.gz

tar xf zlib-1.2.8.tar.gz

cd zlib-1.2.8

./configure --prefix=/usr/local

make&&make install

得到/usr/local/include/zconf.h 位置

2.  cd到Python-2.7.8

    ./configure --prefix=/usr/local --with-libs='/usr/local/include/zconf.h'

    make&&make install

0 人点赞