报错大概是这样的:
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
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.