use*_*589 19 openssl pyopenssl
有什么原因导致下面的错误吗?
我使用Linux centos和openssl-devel.i386 0.9.8e-12.el5_5.7
$ easy_install PyOpenSSL
Searching for PyOpenSSL
Reading http://pypi.python.org/simple/PyOpenSSL/
Reading http://launchpad.net/pyopenssl
Reading http://pyopenssl.sourceforge.net/
Best match: pyOpenSSL 0.13
Downloading http://pypi.python.org/packages/source/p/pyOpenSSL/pyOpenSSL-0.13.tar.gz#md5=767bca18a71178ca353dff9e10941929
Processing pyOpenSSL-0.13.tar.gz
Running pyOpenSSL-0.13/setup.py -q bdist_egg --dist-dir /tmp/easy_install-0Dunib/pyOpenSSL-0.13/egg-dist-tmp-aV6OCC
warning: no previously-included files matching '*.pyc' found anywhere in distribution
OpenSSL/ssl/connection.c: In function ‘ssl_Connection_set_context’:
OpenSSL/ssl/connection.c:289: warning: implicit declaration of function ‘SSL_set_SSL_CTX’
OpenSSL/ssl/connection.c: In function ‘ssl_Connection_get_servername’:
OpenSSL/ssl/connection.c:313: error: ‘TLSEXT_NAMETYPE_host_name’ undeclared (first use in this function)
OpenSSL/ssl/connection.c:313: error: (Each undeclared identifier is reported only once
OpenSSL/ssl/connection.c:313: error: for each function it appears in.)
OpenSSL/ssl/connection.c:320: warning: implicit declaration of function ‘SSL_get_servername’
OpenSSL/ssl/connection.c:320: warning: assignment makes pointer from integer without a cast
OpenSSL/ssl/connection.c: In function ‘ssl_Connection_set_tlsext_host_name’:
OpenSSL/ssl/connection.c:346: warning: implicit declaration of function ‘SSL_set_tlsext_host_name’
error: Setup script exited with error: command 'gcc' failed with exit status 1
Run Code Online (Sandbox Code Playgroud)
小智 27
要在virtualenv下安装它,您应该首先安装所需的包.在ubuntu上:
sudo apt-get install python-dev libffi-dev libssl-dev
Run Code Online (Sandbox Code Playgroud)
然后你可以输入:
pip install pyopenssl
Run Code Online (Sandbox Code Playgroud)
Jea*_*one 25
pyOpenSSL 0.13引入了对(S)erver(N)ame(I)ndication TLS扩展的支持.此扩展允许客户端告诉服务器他们希望与之通信的主机名,允许服务器选择合适的证书来呈现.
在OpenSSL 0.9.8f中引入了对SNI的支持.因此,pyOpenSSL 0.13将使用OpenSSL 0.9.8f或更高版本构建,但不构建OpenSSL 0.9.8e或更早版本,其中不希望包含它所期望的API.
也许较新版本的pyOpenSSL会使这些绑定成为可选,恢复对OpenSSL 0.9.8e及更早版本的支持.但是,类似地,较新版本的OpenSSL也可以与pyOpenSSL 0.13一起使用.
pyOpenSSL项目发布预发布.预发布的广泛测试可以帮助避免像这样的情况.我建议任何依赖pyOpenSSL的人订阅(非常低流量)的pyOpenSSL用户列表(或者在SourceForge上),并在发布完成之前进行预发布时进行的测试.
小智 6
我试图安装Scrapy时遇到了这个问题.对我来说,Thanasis的回答没有用.经过多次谷歌和随机安装的东西
yum install python-devel
Run Code Online (Sandbox Code Playgroud)
允许Scrapy安装为我运行(CentOS版本6.3(最终版))
不完全是什么问题,但在Ubuntu 12.04中它可以安装:
sudo apt-get install python-openssl
Run Code Online (Sandbox Code Playgroud)
对我来说,我必须安装openssl-devel库:
yum install openssl-devel
Run Code Online (Sandbox Code Playgroud)
试图安装旋风/龙卷风/扭曲的python甚至是lib.