Error importing M2Crypto Mac OS X

when I try to import M2Crypto into python, I get the following error:

I am using Mac OS X, python 2.7

ImportError: dlopen(/Users/armita/.python-eggs/M2Crypto-0.22.3-py2.7-macosx-10.9-intel.egg-tmp/M2Crypto/__m2crypto.so, 2): Symbol not found: _X509_free
  Referenced from: /Users/armita/.python-eggs/M2Crypto-0.22.3-py2.7-macosx-10.9-intel.egg-tmp/M2Crypto/__m2crypto.so
  Expected in: flat namespace
 in /Users/armita/.python-eggs/M2Crypto-0.22.3-py2.7-macosx-10.9-intel.egg-tmp/M2Crypto/__m2crypto.so

what should I do?

+4
source share
2 answers

This problem is solved by installing M2Crypto version 21 or 23, 22 causing this problem.

0
source

You are missing libcrypto.

I created a script based on tmiz solution :

You can check it out here .

After installing libssl and libcrypto, you can reinstall M2Crypto.

0
source

All Articles