【问题标题】:problems installing M2Crypto on Mint在 Mint 上安装 M2Crypto 时出现问题
【发布时间】:2012-05-10 17:59:05
【问题描述】:

我正在尝试在 Mint 12 上安装 M2Crypto for python。我已执行 `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 gcc swig m2crypto linux-mint


    【解决方案1】:

    你好像错过了包含python.h的python-dev包

    【讨论】:

    • 我尝试安装 python-dev,但收到错误消息,指出我损坏了软件包。我将在上面的更新中发布错误。
    • @ewok : 尝试apt-get install -f 来修复您的安装
    【解决方案2】:

    试试下面的命令

    $sudo apt-get install python-m2crypto

    【讨论】:

      【解决方案3】:

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

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

      对应问答here

      【讨论】:

        猜你喜欢
        • 2012-05-20
        • 2020-08-28
        • 2017-06-21
        • 1970-01-01
        • 2014-05-11
        • 2013-06-20
        • 2021-06-11
        • 1970-01-01
        • 2021-05-30
        相关资源
        最近更新 更多