我已经尝试了所有可能的方法在Mac上安装M2Crypto。
下面的链接首先是构建openssl,然后是swig,然后是M2Crypto:http://jonatkinson.co.uk/2008/10/09/installing-m2crypto-osx/
以下链接用于更改M2Crypto的setup.py,以创建libssl.a和libcrypto.a的静态链接,但这也不起作用:https://github.com/accessgrid/accessgrid/blame/master/packaging/mac/setup.py.m2crypto-0.17.patch
import M2Crypto
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "build/bdist.macosx-10.10-intel/egg/M2Crypto/__init__.py", line 22, in <module>
File "build/bdist.macosx-10.10-intel/egg/M2Crypto/__m2crypto.py", line 7, in <module>
File "build/bdist.macosx-10.10-intel/egg/M2Crypto/__m2crypto.py", line 6, in __bootstrap__
ImportError: dlopen(/Users/user/.python-eggs/M2Crypto-0.22.3-py2.7-macosx-10.10-intel.egg-tmp/M2Crypto/__m2crypto.so, 2): Symbol not found: _X509_free
Referenced from: /Users/user/.python-eggs/M2Crypto-0.22.3-py2.7-macosx-10.10-intel.egg-tmp/M2Crypto/__m2crypto.so
Expected in: flat namespace
in /Users/user/.python-eggs/M2Crypto-0.22.3-py2.7-macosx-10.10-intel.egg-tmp/M2Crypto/__m2crypto.so发布于 2014-11-24 22:29:14
在尝试安装saltstack时遇到了完全相同的问题。使用easy_install修复。
easy_install M2Crypto-0.21.1-py2.7-macosx-10.8-intel.egg从M2Crypto下载的M2Crypto-0.21.1-py2.7-macosx-10.8-intel.egg文件
还有这篇文章:http://jonatkinson.co.uk/2008/10/09/installing-m2crypto-osx/可能会有所帮助
https://stackoverflow.com/questions/26518836
复制相似问题