Python-Python3 源码编译

CentOS 系统源码编译 Python3。

安装 OpenSSL

1
yum install -y openssl-static

编译源码

1
2
3
4
5
6
yum install -y gcc
tar -zxvf Python-3.5.1.tgz
cd Python-3.5.1
./configure --prefix=/usr/local/python3
make -j 8
make install

添加链接

1
2
ln -s /usr/local/python3/bin/python3 /usr/bin/python3
python3 -V