先安装依赖的库:
yum install openssl -y
yum install openssl-devel -y
yum install gcc
yum install zlib
yum install zlib-devel
一、源码编译
官网地址(python2.7)
https://www.python.org/downloads/release/python-2710/
解压后执行, 执行指定prefix
./configure --prefix=/opt/python2.7
make && make install
时间: 2024-11-03 20:59:32