Python 在Mint上安装M2Crypto时出现问题

Python 在Mint上安装M2Crypto时出现问题,python,gcc,swig,m2crypto,linux-mint,Python,Gcc,Swig,M2crypto,Linux Mint,我正试图在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 如果有人知

我正试图在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

您似乎错过了python开发包,该包包含
python.h

在最近的Debian、Ubuntu或Mint等衍生产品上编译时出现错误:

ImportError: /usr/local/lib/python2.7/dist-packages/M2Crypto/__m2crypto.so: undefined symbol: SSLv2_method
相应的问题和答案。

尝试以下命令

$sudo apt get安装python-m2crypto


我试图安装python dev,但出现了一个错误,指出我已损坏了软件包。我将在上面的更新中发布错误。@ewok:尝试
apt get install-f
修复您的安装