Collecting itchat
Could not fetch URL https://pypi.python.org/simple/itchat/: There was a problem confirming the ssl certificate: Can't connect to HTTPS URL because the SSL module is not available. - skipping
##python3中安装第三方包时报错
[root@foundation31 /opt/Python-3.6.4/Modules]#vim Setup ##在你安装目录下
205 #_socket socketmodule.c
206 _socket socketmodule.c
207 # Socket module helper for SSL support; you must comment out the other
208 # socket line above, and possibly edit the SSL variable:
209 #SSL=/usr/local/ssl
210 #_ssl _ssl.c \
211 # -DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \
212 # -L$(SSL)/lib -lssl -lcrypto
213 _ssl _ssl.c \
214 -DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \
215 -L$(SSL)/lib -lssl -lcrypto
##修改ssl的这行
[root@foundation31 /opt/Python-3.6.4]#./configure ##重新编译(刷新)
[root@foundation31 /opt/Python-3.6.4]#make && make install ##安装
./Modules/_ssl.c:67:25: fatal error: openssl/rsa.h: No such file or directory
#include "openssl/rsa.h" ##报错
##百度:
出现这个或者fatal error: openssl/名单.h: No such file or directory。都是没有安装
libssl-dev~
libssl-dev包含libraries, header files and manpages,他是openssl的一部分,而openssl对ssl进行了实现~
pip install libssl-dev
Could not find a version that satisfies the requirement libssl-dev (from versions: )
No matching distribution found for libssl-dev
easy_install libssl-dev
##2.
python2中自带ssl
yum install openssl-devel -y
解决办法是重新对python3.6进行编译安装,用一下过程来实现编译安装:
cd Python-3.6.2
./configure --with-ssl
make && make install
关于ssl问题
最新推荐文章于 2024-08-04 21:55:23 发布