python - 安装 pyopenssl 时遇到 cffi.ffiplatform.VerificationError

标签 python pyopenssl

我使用的是 Ubuntu 14.04。我试图在我的机器上安装 pyopenssl。 但是,此信息总是失败。我在谷歌上搜索但没有找到任何解决方案:

gcc -pthread -shared /tmp/pip_build_pi314/cryptography/cryptography/hazmat/bindings/__pycache__/cryptography/hazmat/bindings/__pycache__/_Cryptography_cffi_79a5b0a3x3a8a382.o -L/home/pi314/anaconda/lib -lcrypto -lssl -lpython2.7 -o /tmp/pip_build_pi314/cryptography/cryptography/hazmat/bindings/__pycache__/_Cryptography_cffi_79a5b0a3x3a8a382.so

Traceback (most recent call last):

File "/tmp/pip_build_pi314/cryptography/setup.py", line 88, in finalize_options

self.distribution.ext_modules = get_ext_modules()

File "/tmp/pip_build_pi314/cryptography/setup.py", line 68, in get_ext_modules

OpenSSLBinding().ffi.verifier.get_extension(),

File "cryptography/hazmat/bindings/openssl/binding.py", line 89, in __init__

self._ensure_ffi_initialized()

File "cryptography/hazmat/bindings/openssl/binding.py", line 109, in _ensure_ffi_initialized

libraries=libraries,

File "cryptography/hazmat/bindings/utils.py", line 80, in build_ffi

extra_link_args=extra_link_args,

File "/tmp/pip_build_pi314/cryptography/cffi-0.8.6-py2.7-linux-x86_64.egg/cffi/api.py", line 340, in verify

lib = self.verifier.load_library()

File "/tmp/pip_build_pi314/cryptography/cffi-0.8.6-py2.7-linux-x86_64.egg/cffi/verifier.py", line 75, in load_library

return self._load_library()

File "/tmp/pip_build_pi314/cryptography/cffi-0.8.6-py2.7-linux-x86_64.egg/cffi/verifier.py", line 151, in _load_library

return self._vengine.load_library()

File "/tmp/pip_build_pi314/cryptography/cffi-0.8.6-py2.7-linux-x86_64.egg/cffi/vengine_cpy.py", line 149, in load_library

raise ffiplatform.VerificationError(error)

cffi.ffiplatform.VerificationError: importing '/tmp/pip_build_pi314/cryptography/cryptography/hazmat/bindings/__pycache__/_Cryptography_cffi_79a5b0a3x3a8a382.so': /tmp/pip_build_pi314/cryptography/cryptography/hazmat/bindings/__pycache__/_Cryptography_cff i_79a5b0a3x3a8a382.so: undefined symbol: EC_GFp_nistp224_method

最佳答案

因为你在Ubuntu上,你需要安装libssl-dev

sudo apt-get install libssl-dev

您还需要 libffi-develpython-dev

sudo apt-get install libffi-dev python-dev

关于python - 安装 pyopenssl 时遇到 cffi.ffiplatform.VerificationError,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25093158/

相关文章:

php - Python 相当于 PHP 的 date()

python - 是否可以覆盖 Django 管理中的单个文本字段?

python-2.7 - 来自 Chrome 的 Http 请求挂起 python 网络服务器

python - 使用库 pyOpenSSL 使用 DSA 签署消息

python - 使用保存到新 HDFStore 中的 block 大小来迭代 HDFStore

python - 如何使用 Tkinter after() 方法?

python - 执行三向连接

python - Scrapy代理ip不适用于https,返回 'ssl handshake failure'

python - 在 PyOpenSSL 中启动重新协商

python - python中的Alexa请求验证