Linux笔记-Caused by SSLError(“Can‘t connect to HTTPS URL because the SSL module is not available.“)

Posted IT1995

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Linux笔记-Caused by SSLError(“Can‘t connect to HTTPS URL because the SSL module is not available.“)相关的知识,希望对你有一定的参考价值。

这里是我用把Python用pyinstaller打包后,出现的问题。

解决是重安下OpenSSL。

wget http://www.openssl.org/source/openssl-1.0.2j.tar.gz
tar -zxvf openssl-1.0.2j.tar.gz
cd openssl-1.0.2j

./config --prefix=/usr/local/openssl shared zlib
make && make install

安装好后,再重按下Python3

./configure --prefix=/usr/local/python3 -enable-shared
cd Modules
vi Setup

修改如下内容:

...
# Socket module helper for SSL support; you must comment out the other
# socket line above, and possibly edit the SSL variable:

SSL=/usr/local/openssl/
_ssl _ssl.c \\
-DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \\
-L$(SSL)/lib -lssl -lcrypto

设置好软连接:

ln -s /usr/local/openssl/lib/libssl.so.1.0.0 /usr/lib64/libssl.so.1.0.0
ln -s /usr/local/openssl/lib/libcrypto.so.1.0.0 /usr/lib64/libcrypto.so.1.0.0
cd ..
make && make install

最后重新打包就好了:

pyinstaller xxx.py

以上是关于Linux笔记-Caused by SSLError(“Can‘t connect to HTTPS URL because the SSL module is not available.“)的主要内容,如果未能解决你的问题,请参考以下文章

Linux笔记-Caused by SSLError(“Can‘t connect to HTTPS URL because the SSL module is not available.“)

笔记本蓝屏啊,分析代码如下:Probably caused by : ntoskrnl.exe ( nt+70740 ) 。请高手帮忙,说清楚了,

war包部署到linux服务器上报错Caused by: java.lang.IllegalArgumentException

Caused by: java.lang.NoClassDefFoundError: javax/el/ELManager

Jenkins启动报 Caused by: java.io.IOException: 结构需要清理

docker exec failed!!error from pipe caused "read parent: connection reset by peer"问题