【发布时间】:2014-02-11 11:44:09
【问题描述】:
目标:我正在使用 RedHat 5 并尝试为 Web 应用安装最新的 python 和 django。
我成功地 altinstalled 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 的证书,但不知道如何处理它,将其存储在哪里。 google 上的信息不多,需要高手帮忙。
谢谢!
编辑:我的意思是 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'.
【问题讨论】:
-
运行这个命令,你的CA证书好像没有更新:
curl http://curl.haxx.se/ca/cacert.pem -o /etc/pki/tls/certs/ca-bundle.crt然后再试一次。 -
@BurhanKhalid Spot on.. 谢谢。您应该将其作为答案提交,这可能是每个人的挣扎...
标签: python django ssl easy-install pypi