在Mint上安装M2Crypto的问题

时间:2012-05-10 17:59:06

标签: python gcc swig m2crypto linuxmint

我正在尝试在Mint 12上为python安装M2Crypto。我已经执行了`python setup.py build,但构建失败,说明

error: command 'gcc' failed with exit status 1

前两行显示Python.h可能存在问题:

SWIG/_m2crypto_wrap.c:126:20: fatal error: Python.h: No such file or directory
compilation terminated

如果有人知道需要做些什么来解决这个问题,请告诉我。

修改

我尝试安装python-dev,但收到以下错误:

The following packages have unmet dependencies:
 python-dev: Depends: python (= 2.6.6-2ubuntu1) but 2.7.2-7ubuntu2 is to be installed
E: Unable to correct problems, you have held broken packages

3 个答案:

答案 0 :(得分:2)

看起来你错过了包含python.h

的python-dev软件包

答案 1 :(得分:1)

尝试以下命令

  

$ sudo apt-get install python-m2crypto

答案 2 :(得分:0)

在最近的Debian,Ubuntu或Mint等衍生品上进行编译会出错:

ImportError: /usr/local/lib/python2.7/dist-packages/M2Crypto/__m2crypto.so: undefined symbol: SSLv2_method

相应的问答here