系统centos5.10
python版本2.7.5
已经安装了scrapy所有依赖包,更新了oenpssl
更新了openssl
[root@iZbp19u6ifs6ey95jlrdqtZ ~]# openssl version
OpenSSL 1.0.1g 7 Apr 2014
这里的版本没变
python -c "import ssl; print ssl.OPENSSL_VERSION"
OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008
执行scrapy命令会报错
[root@iZbp19u6ifs6ey95jlrdqtZ ~]# scrapy
Traceback (most recent call last):
File "/usr/local/bin/scrapy", line 5, in <module>
pkg_resources.run_script('Scrapy==0.24.0', 'scrapy')
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 743, in run_script
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 1498, in run_script
File "/usr/local/python2.7/lib/python2.7/site-packages/Scrapy-0.24.0-py2.7.egg/EGG-INFO/scripts/scrapy", line 3, in <module>
from scrapy.cmdline import execute
File "/usr/local/python2.7/lib/python2.7/site-packages/Scrapy-0.24.0-py2.7.egg/scrapy/cmdline.py", line 9, in <module>
from scrapy.crawler import CrawlerProcess
File "/usr/local/python2.7/lib/python2.7/site-packages/Scrapy-0.24.0-py2.7.egg/scrapy/crawler.py", line 3, in <module>
from twisted.internet import reactor, defer
File "/usr/local/python2.7/lib/python2.7/site-packages/Twisted-16.6.0-py2.7-linux-x86_64.egg/twisted/internet/reactor.py", line 38, in <module>
from twisted.internet import default
File "/usr/local/python2.7/lib/python2.7/site-packages/Twisted-16.6.0-py2.7-linux-x86_64.egg/twisted/internet/default.py", line 56, in <module>
install = _getInstallFunction(platform)
File "/usr/local/python2.7/lib/python2.7/site-packages/Twisted-16.6.0-py2.7-linux-x86_64.egg/twisted/internet/default.py", line 44, in _getInstallFunction
from twisted.internet.epollreactor import install
File "/usr/local/python2.7/lib/python2.7/site-packages/Twisted-16.6.0-py2.7-linux-x86_64.egg/twisted/internet/epollreactor.py", line 24, in <module>
from twisted.internet import posixbase
File "/usr/local/python2.7/lib/python2.7/site-packages/Twisted-16.6.0-py2.7-linux-x86_64.egg/twisted/internet/posixbase.py", line 18, in <module>
from twisted.internet import error, udp, tcp
File "/usr/local/python2.7/lib/python2.7/site-packages/Twisted-16.6.0-py2.7-linux-x86_64.egg/twisted/internet/tcp.py", line 28, in <module>
from twisted.internet._newtls import (
File "/usr/local/python2.7/lib/python2.7/site-packages/Twisted-16.6.0-py2.7-linux-x86_64.egg/twisted/internet/_newtls.py", line 21, in <module>
from twisted.protocols.tls import TLSMemoryBIOFactory, TLSMemoryBIOProtocol
File "/usr/local/python2.7/lib/python2.7/site-packages/Twisted-16.6.0-py2.7-linux-x86_64.egg/twisted/protocols/tls.py", line 41, in <module>
from OpenSSL.SSL import Error, ZeroReturnError, WantReadError
File "build/bdist.linux-x86_64/egg/OpenSSL/__init__.py", line 8, in <module>
#
File "build/bdist.linux-x86_64/egg/OpenSSL/rand.py", line 12, in <module>
File "build/bdist.linux-x86_64/egg/OpenSSL/_util.py", line 6, in <module>
File "/usr/local/python2.7/lib/python2.7/site-packages/cryptography-1.4-py2.7-linux-x86_64.egg/cryptography/hazmat/bindings/openssl/binding.py", line 250, in <module>
_verify_openssl_version(Binding.lib.SSLeay())
File "/usr/local/python2.7/lib/python2.7/site-packages/cryptography-1.4-py2.7-linux-x86_64.egg/cryptography/hazmat/bindings/openssl/binding.py", line 230, in _verify_openssl_version
"You are linking against OpenSSL 0.9.8, which is no longer "
RuntimeError: You are linking against OpenSSL 0.9.8, which is no longer support by the OpenSSL project. You need to upgrade to a newer version of OpenSSL.
建议升级Openssl的版本,具体操作可以参考这篇文章:
OpenSSL升级到最新版本