wget https://mirrors.huaweicloud.com/python/3.10.10/Python-3.10.10.tgz
wget https://www.openssl.org/source/openssl-1.1.1n.tar.gz
1.安装openssl
tar -xf openssl-1.1.1n.tar.gz && cd openssl-1.1.1n && ./config --prefix=/usr/local/openssl
删除机器自动openssl
yum -y remove openssl-1.0.2k-25.el7_9.x86_64
mv /usr/include/openssl /usr/include/opensslback
ln -s /usr/local/openssl/include/openssl /usr/include/openssl
ln -s /usr/local/openssl/bin/openssl /usr/bin/openssl
echo "/usr/local/openssl/lib" >> /etc/ld.so.conf
ldconfig -v
openssl version
结果:
[root@genshin-bot src]# openssl version
OpenSSL 1.1.1n 15 Mar 2022
2.
tar -xf Python-3.10.10.tgz && cd Python-3.10.10 && ./configure --prefix=/usr/local/python3 --with-openssl=/usr/local/openssl/ && make && make install
ln -s /usr/local/python3/bin/python3.10 /usr/bin/python3
[root@genshin-bot src]# /usr/bin/python3
Python 3.10.10 (main, Mar 21 2023, 15:22:54) [GCC 4.8.5 20150623 (Red Hat 4.8.5-44)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import ssl
python3.10带openssl
原创
©著作权归作者所有:来自51CTO博客作者yawei555的原创作品,请联系作者获取转载授权,否则将追究法律责任
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
自签openssl证书(包含泛域名)
实现https自签证书(泛域名)
服务器 html IP