python升级到2.7.10中ssl出错?

我系统是ubuntu14.04,默认python版本有点低,就动手升级,去官网下好了安装包,按照网上的方法编译安装好了,测试能用,但无法安装pip,网上查了,说是ssl没装,装好openssl后,重新编译,make时出错了:

gcc -pthread -Wl,-rpath /usr/local/lib -Xlinker -export-dynamic -o python \
            Modules/python.o \
            libpython2.7.a -lpthread -ldl  -lutil -L/usr/lib -lssl -lcrypto   -lm  
libpython2.7.a(posixmodule.o): In function `posix_tmpnam':
/home/xx/Python-2.7.10/./Modules/posixmodule.c:7631: warning: the use of `tmpnam_r' is dangerous, better use `mkstemp'
libpython2.7.a(posixmodule.o): In function `posix_tempnam':
/home/xx/Python-2.7.10/./Modules/posixmodule.c:7578: warning: the use of `tempnam' is dangerous, better use `mkstemp'
libpython2.7.a(_ssl.o): In function `_set_alpn_protocols':
/home/xx/Python-2.7.10/./Modules/_ssl.c:2266: undefined reference to `SSL_CTX_set_alpn_protos'
/home/xx/Python-2.7.10/./Modules/_ssl.c:2268: undefined reference to `SSL_CTX_set_alpn_select_cb'
libpython2.7.a(_ssl.o): In function `PySSL_selected_alpn_protocol':
/home/xx/Python-2.7.10/./Modules/_ssl.c:1429: undefined reference to `SSL_get0_alpn_selected'
collect2: error: ld returned 1 exit status
make: *** [python] Error 1

这是怎么回事啊,求大神解决,谢谢了。

阅读 8.9k
2 个回答
新手上路,请多包涵

楼主,请问问题是怎么解决的?这个问题也困扰我很久了

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题
宣传栏