problems installing M2Crypto on Mint

谁说我不能喝 提交于 2019-12-11 04:19:28

问题


I am trying to install M2Crypto for python on Mint 12. I have executed `python setup.py build, but the build fails, stating

error: command 'gcc' failed with exit status 1

the preceding 2 lines show that there may be a problem with Python.h:

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

If anyone knows what needs to be done to fix this, please let me know.

EDIT

I have attempted to install python-dev, but I get the following error:

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

回答1:


It looks that you miss the python-dev package which contains python.h




回答2:


try following command

$sudo apt-get install python-m2crypto




回答3:


Compiling on recent Debian, Ubuntu or derivatives like Mint gives an error:

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

Corresponding question and answer here.



来源:https://stackoverflow.com/questions/10539676/problems-installing-m2crypto-on-mint

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!