Commit b405c57c by larosa

add ssl

parent 412d9cfb
Showing with 43 additions and 0 deletions
......@@ -32,6 +32,49 @@ ln -s /usr/local/python3.8/bin/pip3.8 /usr/bin/pip3.8
# 解决 pip ssl 报错的问题
#/usr/bin/pip3.8 install pika -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
# 解决 python3.8 没有 ssl模块的问题 (无法import ssl)
wget https://www.openssl.org/source/openssl-1.1.1g.tar.gz
tar -zxvf openssl-1.1.1g.tar.gz
cd openssl-1.1.1g
./config --prefix=/usr/local/openssl
make
make install
mv /usr/bin/openssl /usr/bin/openssl.bak
mv /usr/include/openssl/ /usr/include/openssl.bak
ln -s /usr/local/openssl/include/openssl /usr/include/openssl
ln -s /usr/local/openssl/lib/libssl.so.1.1 /usr/local/lib64/libssl.so
ln -s /usr/local/openssl/bin/openssl /usr/bin/openssl
echo "/usr/local/openssl/lib" >> /etc/ld.so.conf
ldconfig -v
openssl version
export LDFLAGS=" -L/usr/local/openssl/lib"
export CPPFLAGS=" -I/usr/local/openssl/include"
export PKG_CONFIG_PATH="/usr/local/openssl/lib/pkgconfig"
#重新安装 python3.8
./configure --enable-shared --with-openssl=/usr/local/openssl --prefix=/usr/local/python3.8
make
make altinstall
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment