Centos7.9编译安装Python3.11.15
·
项目需要,在centos7.9下安装3.11.15
默认直接编译会因为gcc版本太低的原因报错
wget https://www.python.org/ftp/python/3.11.15/Python-3.11.15.tgz
解压后
sudo ./configure --with-openssl=$(pkg-config --variable=prefix openssl) --enable-shared
sudo make -j$(nproc)
sudo make altinstall
然后
echo "/usr/local/lib" | sudo tee /etc/ld.so.conf.d/python311.conf
echo "/usr/lib64/openssl11" | sudo tee -a /etc/ld.so.conf.d/python311.conf
sudo ldconfig
验证
python3.11 -V
更多推荐
所有评论(0)