首页 > 编程语言 >python3.10带openssl

python3.10带openssl

时间:2023-03-21 16:03:31浏览次数:48  
标签:python3.10 bin 3.10 openssl usr && local

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,bin,3.10,openssl,usr,&&,local
From: https://blog.51cto.com/huwei555/6140266

相关文章