目标:,我在RedHat 5上,试图为一个web应用程序安装最新的python。
我成功地安装了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查找s_client的证书,但是不知道如何处理它,在哪里存储它。谷歌的信息不多,需要专家的帮助。
谢谢!
编辑:我指的是使用openssl的wget*。
$ 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 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'.发布于 2015-06-09 09:45:38
您的curl证书太旧了,请下载新的curl证书:
sudo wget http://curl.haxx.se/ca/cacert.pem -O /etc/pki/tls/certs/ca-bundle.crt发布于 2014-06-01 19:37:04
我在寻找这个问题的解决方案后找到了这个页面。如果其他人有类似的问题,我发现的解决方案是:
在setuptools/ssl_support.py文件的开头(由easy_install使用,在egg文件:./lib/python2.7/site-packages/setuptools-3.5.1-py2.7.egg中),证书包文件在cert_paths变量中进行了硬编码:
cert_paths = """
/etc/pki/tls/certs/ca-bundle.crt
/etc/ssl/certs/ca-certificates.crt
/usr/share/ssl/certs/ca-bundle.crt
/usr/local/share/certs/ca-root.crt
...etc..
"""easy_install将使用该列表中存在的第一个文件,如它所调用的find_ca_bundle。如果此cert文件中的证书过期,则easy_install将因此SSL错误而失败。因此,需要更新证书文件或更改此ssl_support.py文件中的ssl_support.py,以指向本地最新的证书包文件。
发布于 2015-06-04 11:11:41
我在一个特定的环境中看到了这个问题: Mac带有macports,在用户的本地路径上安装软件包。解决方案是从curl安装证书:
port install curl-ca-bundle顺便说一句,除非您没有证书,否则大多数port、easy_install和pip命令都会因为ssl错误而失败。
https://stackoverflow.com/questions/21265616
复制相似问题