openssl 官方下载地址:https://www.openssl.org/source/
wget https://github.com/openssl/openssl/archive/OpenSSL_1_1_1d.tar.gz
解压
tar -zxvf OpenSSL_1_1_1d.tar.gz
进入openssl-OpenSSL_1_1_1d
cd openssl-OpenSSL_1_1_1d
指定安装路径并编译
./config --prefix=/usr/local/openssl // 指定安装路径 make && make install
mv /usr/bin/openssl /usr/bin/openssl.old mv /usr/lib64/openssl /usr/lib64/openssl.old mv /usr/lib64/libssl.so /usr/lib64/libssl.so.old ln -s /usr/local/openssl/bin/openssl /usr/bin/openssl ln -s /usr/local/openssl/include/openssl /usr/include/openssl ln -s /usr/local/openssl/lib/libssl.so /usr/lib64/libssl.so echo "/usr/local/openssl/lib" >> /etc/ld.so.conf ldconfig -v // 建立动态链接
openssl version
进入解压后的Python目录
cd Python-3.7.1 ./configure --prefix=/usr/local/python3 --with-openssl=/usr/local/openssl make make install ln -sf /usr/local/python3/bin/python3 /usr/bin/python3 ln -sf /usr/local/python3/bin/pip3 /usr/bin/pip3
python3 -V pip3 -V