scrapy OpenSSL error: command ‘gcc’ failed with exit status 1
在安装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
原来是centos5下pyopenssl 0.13的版本和openssl不兼容
下载补丁
wget https://bugs.launchpad.net/pyopenssl/+bug/845445/+attachment/2666639/+files/pyOpenSSL-0.13.centos5.patch
移动补丁到对应的目录下
mv *.patch pyOpenSSL-0.13
进入目录
cd pyOpenSSL-0.13
patch -p1 < pyOpenSSL-0.13.centos5.patch
安装带补丁的pyOpenSSL完成后,再安装scrapy就成功了
暂无评论