python - 在 Mint 上安装 M2Crypto 时出现问题

标签 python gcc swig m2crypto linux-mint

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

error: command 'gcc' failed with exit status 1

前面2行表明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.h 的 python-dev 包

关于python - 在 Mint 上安装 M2Crypto 时出现问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10539676/

相关文章:

c++ - 使用 SWIG 在 Lua 中实现和继承 C++ 类

python - 根据列表中列表的大小返回两个列表

c - 为什么包含使用完整路径的 header 会导致更好的错误消息?

python - 比较两个中文单词是否相等

c++ - std::thread::id 的 std::operator== 中的段错误

python - scipy.weave.inline 的语法错误

c - SWIG - 使用 %newobject 的垃圾收集

php - 哪种性能更好 - 使用 php-qt 或使用 swig 为 c++ 编写自定义 php 扩展?

python - Pandas DataFrame 到列表列表的字典

python - "len() of unsized object"错误