目标: 我正在使用 RedHat 5 并尝试为网络应用程序安装最新的 python 和 django。
我成功地安装了 python27 和 easy_install,以及带有 openssl 的 wget。
问题:但是,现在我尝试从 pypi.python.org 获取任何内容时,出现以下错误:
$ sudo easy_install --verbose django
Searching for django
Reading https://pypi.python.org/simple/django/
Download error on https://pypi.python.org/simple/django/: [Errno 1] _ssl.c:507: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed -- Some packages may not be found!
Couldn't find index page for 'django' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
Download error on https://pypi.python.org/simple/: [Errno 1] _ssl.c:507: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed -- Some packages may not be found!
No local packages or download links found for django
error: Could not find suitable distribution for Requirement.parse('django')
我尝试使用 openssl s_client -showcert -connect 查找 pypi.python.org 的证书,但不知道如何处理它,将它存储在哪里。谷歌资料不多,求高手帮忙。
谢谢!
编辑:我的意思是 wget* 和 openssl。
$ wget http://ftp.gnu.org/gnu/wget/wget-1.15.tar.gz
$ tar -xzf wget-1.15.tar.gz
$ cd wget-1.15
$ ./configure --with-ssl=openssl
$ make
$ sudo make install
我也无法让 wget 拉取页面:
$ wget https://pypi.python.org/simple/django/
--2014-01-21 11:18:45-- https://pypi.python.org/simple/django/
Resolving pypi.python.org (pypi.python.org)... 199.27.73.185, 199.27.74.184
Connecting to pypi.python.org (pypi.python.org)|199.27.73.185|:443... connected.
ERROR: cannot verify pypi.python.org's certificate, issued by ‘/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert High Assurance CA-3’:
Unable to locally verify the issuer's authority.
To connect to pypi.python.org insecurely, use `--no-check-certificate'.
最佳答案
您的 curl 证书太旧尝试下载新的 curl 证书:
sudo wget http://curl.haxx.se/ca/cacert.pem -O /etc/pki/tls/certs/ca-bundle.crt
关于python easy_install 因所有包的 SSL 证书错误而失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21265616/