[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)

今天在freebsd上 使用easy_install scrapy命令来安装scrapy, 结果报错:


[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)


后来查看了资料:

https://www.mail-archive.com/[email protected]/msg235525.html


这个资料也很新了, 是2015年2月9日的.


认为可能是python2.7.9的版本的问题, 然后尝试着重新编译了python2.7.9(这个之前, 重新编译了openssl)


然后再使用easy_install scrapy就没有错误了.

----------------------

如果还不能解决, 可能需要装



You may install ca_root_nss only.

dlat
Yes. This works only out of the box if you build the security/ca_root_nss port with the option ETCSYMLINK enabled. If you didn’t enable it or if you installed the package, you need to manually add the following symlink:

   ln -sf /usr/local/share/certs/ca-root-nss.crt /etc/ssl/cert.pem


参考资料: 

http://stackoverflow.com/questions/22027418/openssl-python-requests-error-certificate-verify-failed


http://smyck.net/2014/01/22/freebsd-authentication-error/


https://github.com/blog/1734-improving-our-ssl-setup



你可能感兴趣的:(Python)