我目前正在使用pyOpenssl,它使用1.0.1f
由系统安装的 openssl。现在我1.0.1j
从源代码安装openssl,并将新版本库路径设置为LD_LIBRARY_PATH
,此时,当我运行我的py文件时,它会产生错误:
File "sslcert.py", line 5, in <module>
from OpenSSL import SSL, _util, crypto
...
File "/usr/local/lib/python2.7/dist-packages/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 '/usr/local/lib/python2.7/dist-packages/cryptography-0.6.1-py2.7-linux-x86_64.egg/cryptography/_Cryptography_cffi_36a40ff0x2bad1bae.so':
/usr/local/lib/python2.7/dist-packages/cryptography-0.6.1-py2.7-linux-x86_64.egg/cryptography/_Cryptography_cffi_36a40ff0x2bad1bae.so:
symbol EC_GFp_nistp521_method, version OPENSSL_1.0.1 not defined in file libcrypto.so.1.0.0 with link time reference
我想知道为 pyOpenssl 使用最新的 openssl 库,如何解决这个问题?