python easy_install发生所有软件包的SSL证书错误 [英] python easy_install fails with SSL certificate error for all packages
问题描述
目标:我正在RedHat 5,并尝试为网络应用程序安装最新的python和django。
Goal: I'm on RedHat 5 and trying to install the latest python and django for a web app.
我成功安装了python27和easy_install,并使用openssl进行了wget。
I successfully altinstalled python27 and easy_install, and wget with openssl.
问题:但是现在我尝试从pypi.python.org获取任何内容,我收到以下错误:
Problem: However now that I try to get anything from pypi.python.org I get the following error:
$ 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的证书,但不知道该怎么办,在哪里存储它。谷歌的信息不多,需要专家的帮助。
I tried looking up the certificate of pypi.python.org with openssl s_client -showcert -connect but don't know what to do with it, where to store it. Not much info on google, need expert help.
谢谢!
编辑:我的意思是wget * with openssl。
edit: I meant wget* with 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拉页面:
I can't get wget to pull the page either:
$ 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'.
推荐答案
您的卷曲证书太旧试图下载新的卷曲证书:
your curl cert is too old try to download new curl cert:
wget http://curl.haxx.se/ca/cacert.pem
mv cacert.pem ca-bundle.crt
sudo mv ca-bundle.crt /etc/pki/tls/certs
这篇关于python easy_install发生所有软件包的SSL证书错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!