修改后(一共四个地方修改了) # Socket module helper for socket(2) _socket socketmodule.c # Socket module helper for SSL support; you must comment out the other # socket line above, and possibly edit the SSL variable: #SSL=/usr/local/ssl _ssl _ssl.c \ -DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \ -L$(SSL)/lib -lssl -lcrypto
4、重新编译安装
1
./configure && make && make install
5、查看ssl模块是否安装成功
1 2 3 4 5 6 7 8 9
[root@VM_130_127_centos ~]# python3 Python 3.6.4 (default, Nov 6 2018, 18:10:48) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import ssl >>> print(ssl.PROTOCOL_SSLv23) _SSLMethod.PROTOCOL_TLS >>> #没有报错说明已经安装成功