我已从GitHub下载了代码。我试图在我的linux机器上运行该代码,并且我已经安装了所有必需的库。但是代码不起作用并显示以下错误。请帮我摆脱这个问题。我会感激你的。
Traceback (most recent call last):
File "server.py", line 9, in <module>
from M2Crypto import SMIME, X509, BIO
File "/usr/local/lib/python2.7/dist-packages/M2Crypto-0.25.1-py2.7-linux-x86_64.egg/M2Crypto/__init__.py", line 26, in <module>
from M2Crypto import (ASN1, AuthCookie, BIO, BN, DH, DSA, EVP, Engine, Err,
File "/usr/local/lib/python2.7/dist-packages/M2Crypto-0.25.1-py2.7-linux-x86_64.egg/M2Crypto/ASN1.py", line 15, in <module>
from M2Crypto import BIO, m2, util
File "/usr/local/lib/python2.7/dist-packages/M2Crypto-0.25.1-py2.7-linux-x86_64.egg/M2Crypto/BIO.py", line 10, in <module>
from M2Crypto import m2, util
File "/usr/local/lib/python2.7/dist-packages/M2Crypto-0.25.1-py2.7-linux-x86_64.egg/M2Crypto/m2.py", line 30, in <module>
from M2Crypto._m2crypto import *
File "/usr/local/lib/python2.7/dist-packages/M2Crypto-0.25.1-py2.7-linux-x86_64.egg/M2Crypto/_m2crypto.py", line 26, in <module>
__m2crypto = swig_import_helper()
File "/usr/local/lib/python2.7/dist-packages/M2Crypto-0.25.1-py2.7-linux-x86_64.egg/M2Crypto/_m2crypto.py", line 22, in swig_import_helper
_mod = imp.load_module('__m2crypto', fp, pathname, description)
ImportError: /usr/local/lib/python2.7/dist-packages/M2Crypto-0.25.1-py2.7-linux-x86_64.egg/M2Crypto/__m2crypto.so: undefined symbol: SSLv2_method
答案 0 :(得分:0)
尽管this回答显示了M2Crypto-0.21.1
的补丁,但它对我来说从未奏效
默认情况下,ubuntu openssl
构建时没有SSLv2
支持explained here,我必须从源代码编译openssl
才能使其正常工作。