Problems installing M2Crypto on Mint

I am trying to install M2Crypto for python on Mint 12. I did `python setup.py build, but the build failed by specifying

error: command 'gcc' failed with exit status 1 

the previous 2 lines show that there might be a problem with Python.h:

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

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

EDIT

I tried installing 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
source share
3 answers

It looks like you missed the python-dev package that contains python.h

+2
source

try the command

$ sudo apt-get install python-m2crypto

+1
source

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

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

The relevant question and answer is here .

0
source

Source: https://habr.com/ru/post/1412004/


All Articles