安装scrapy(openSSL)

时间:2012-06-18 14:22:10

标签: linux centos scrapy pyopenssl

我现在正在使用scrapy几个月。我一直在几台机器上使用它,从来没有遇到过麻烦。我在Windows xp和7上使用它,我也在arch linux上使用它,从来没有遇到过安装问题。差不多只是pip install scrapy并完成了。

现在我正在尝试在使用CentOS的生产服务器上进行设置。由于CentOS默认使用python2.4,我首先进行了python2.7的并行安装。此外,我为python 2.7安装了virtualenv,在那一刻,一切看起来都不会出错,我的环境很干净,并且有了我的点子。

但是当我尝试pip install scrapy时,它给了一个错误。

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: command 'gcc' failed with exit status 1

以下是pip日志文件中保存的错误。

运行package.py egg_info for package pyOpenSSL

running egg_info
writing pip-egg-info/pyOpenSSL.egg-info/PKG-INFO
writing top-level names to pip-egg-info/pyOpenSSL.egg-info/top_level.txt
writing dependency_links to pip-egg-info/pyOpenSSL.egg-info/dependency_link$
warning: manifest_maker: standard file '-c' not found

如果有人知道它可能是什么,或者有这个问题,请帮忙。

1 个答案:

答案 0 :(得分:2)

这似乎是pyOpenSSL

的已知错误

https://bugs.launchpad.net/pyopenssl/+bug/845445

我只需手动安装0.12版本就解决了

http://pypi.python.org/pypi/pyOpenSSL/0.12