python 3.5.0 installation fails on ubuntu 14.04

来源:互联网 发布:笔记本怎么用梯子 知乎 编辑:程序博客网 时间:2024/05/21 12:41

今天安装好pyenv的目的是为了安装3.5.1和便于管理python库,但是遇到了如下问题:

pyenv install 3.5.0Downloading Python-3.5.0.tgz...1->        https://yyuu.github.io/pythons/584e3d5a02692ca52fce505e68ecd77248a6f2c99adf9db144a39087336b0fe0Installing Python-3.5.0...ERROR: The Python ssl extension was not compiled. Missing the OpenSSL lib?Please consult to the Wiki page to fix the problem.https://github.com/yyuu/pyenv/wiki/Common-build-problemsBUILD FAILED (Ubuntu 14.04 using python-build 20151105-4-g9ca7de5)

查阅半天终于在stackoverflow上找到解决方式。

Ref: 

https://stackoverflow.com/questions/37227854/pyenv-build-failed-ubuntu-15-04-using-python-build-20160509/37229034#37229034

https://github.com/yyuu/pyenv/issues/483


0down vote

To install python by using pyenv, the command pyenv install -v 2.7.11 could show more message thanpyenv install 2.7.11. So it will be easy for me to locate the error. This time I got

curl: (77) error setting certificate verify locations: CAfile:/etc/pki/tls/certs/ca-bundle.crtCApath: none

This problem has already been solved in curl: (77) error

# sudo apt-get install ca-certificates

The issue was that curl expected the certificate to be at the path /etc/pki/tls/certs/ca-bundle.crt but could not find it because it was at the path/etc/ssl/certs/ca-certificates.crt.

Copying my certificate to the expected destination by running

sudo cp /etc/ssl/certs/ca-certificates.crt /etc/pki/tls/certs/ca-bundle.crt

worked for me. You will need to create folders for the target destination if they do not exist by running

sudo mkdir -p /etc/pki/tls/certs

If needed, modify the above command to make the destination file name match the path expected by curl, i.e. replace/etc/pki/tls/certs/ca-bundle.crt with the path following "CAfile:" in your error message.


同时千万记得,安装完后要进行数据库更新:

pyenv rehash

0 0
原创粉丝点击