报错大概是这样的:
running build
running build_ext
building dbm using gdbm
building '_ssl' extension
gcc -pthread -fPIC -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -I/usr/local/include -I/home/caimaoy/python_install/Python-2.7.10/Include -I/home/caimaoy/python_install/Python-2.7.10 -c /home/yuechen/python_install/Python-2.7.10/Modules/_ssl.c -o build/temp.linux-x86_64-2.7/home/caimaoy/python_install/Python-2.7.10/Modules/_ssl.o
gcc -pthread -shared build/temp.linux-x86_64-2.7/home/caimaoy/python_install/Python-2.7.10/Modules/_ssl.o -L/usr/local/lib -lssl -lcrypto -o build/lib.linux-x86_64-2.7/_ssl.so
*** WARNING: renaming "_ssl" since importing it failed: build/lib.linux-x86_64-2.7/_ssl.so: undefined symbol: SSL_CTX_set_alpn_protos
Python build finished, but the necessary bits to build these modules were not found:
bsddb185 dl imageop
sunaudiodev
To find the necessary bits, look in setup.py in detect_modules() for the module's name.
Failed to build these modules:
_ssl
openssl.i686 1.0.1e-42.el6_7.1 @updates
openssl.x86_64 1.0.1e-42.el6_7.1 @updates
openssl-devel.i686 1.0.1e-42.el6_7.1 @updates
openssl-devel.x86_64 1.0.1e-42.el6_7.1 @updates
Modules/Setup.dist 修改为如下
# 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
求如何编译成功 ssl
1
julyclyde 2015-12-18 23:41:20 +08:00
如果没有什么练手之类的需求,建议直接安装 epel 或者 scl 里的 python27
|
2
yewang15215 2017-08-28 18:01:53 +08:00
卸载旧版 openssl,重新安装新版
|