I have downloaded a code from GitHub. I tried to run that code in my linux machine and i have installed all required libraries.But the code is not working and displaying the following error. Please help me to get out of this problem.I will be thankful to you.
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
Although this answer suggests a patch for M2Crypto-0.21.1
, it never worked for me.
By default ubuntu has openssl
built without SSLv2
support as explained here, I had to compile openssl
from source to get it working.