Install python-mcrypt on Ubuntu

lsolesen lsolesen at gmail.com
Tue Sep 14 16:14:51 CEST 2010


I am trying to install python-mcrypt (http://labix.org/python-mcrypt)
on Ubuntu, but I cannot get it to work. I have the following python
installed:

Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56)
[GCC 4.4.3] on linux2

I get the following message when trying to install.

lsolesen at lsolesen-lenovo:~/Desktop/python-mcrypt-1.1$ python setup.py
install
running install
running build
running build_ext
building 'mcrypt' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -
Wstrict-prototypes -fPIC -DVERSION="1.1" -I/usr/include/python2.6 -c
mcrypt.c -o build/temp.linux-i686-2.6/mcrypt.o
mcrypt.c:24:20: error: Python.h: No such file or directory
mcrypt.c:25:26: error: structmember.h: No such file or directory
mcrypt.c:39: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘*’ token
mcrypt.c:43: error: ‘NULL’ undeclared here (not in a function)
mcrypt.c:54: error: expected specifier-qualifier-list before
‘PyObject_HEAD’
mcrypt.c:69: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘MCRYPT_members’
mcrypt.c:75: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘PyTypeObject’
mcrypt.c: In function ‘catch_mcrypt_error’:
mcrypt.c:89: warning: implicit declaration of function ‘strdup’
mcrypt.c:89: warning: incompatible implicit declaration of built-in
function ‘strdup’
mcrypt.c:90: warning: implicit declaration of function ‘strlen’
mcrypt.c:90: warning: incompatible implicit declaration of built-in
function ‘strlen’
mcrypt.c:92: warning: implicit declaration of function
‘PyErr_SetString’
mcrypt.c:92: error: ‘MCRYPTError’ undeclared (first use in this
function)
mcrypt.c:92: error: (Each undeclared identifier is reported only once
mcrypt.c:92: error: for each function it appears in.)
mcrypt.c:93: warning: implicit declaration of function ‘free’
mcrypt.c:93: warning: incompatible implicit declaration of built-in
function ‘free’
mcrypt.c: At top level:
mcrypt.c:103: error: expected declaration specifiers or ‘...’ before
‘PyObject’
mcrypt.c: In function ‘get_iv_from_obj’:
mcrypt.c:105: error: ‘ivobj’ undeclared (first use in this function)
mcrypt.c:105: error: ‘Py_None’ undeclared (first use in this function)
mcrypt.c:107: warning: implicit declaration of function
‘PyString_Check’
mcrypt.c:108: warning: implicit declaration of function
‘PyString_Size’
mcrypt.c:109: warning: implicit declaration of function
‘PyString_AsString’
mcrypt.c:110: error: ‘MCRYPTObject’ has no member named ‘iv_size’
mcrypt.c:111: warning: implicit declaration of function ‘PyErr_Format’
mcrypt.c:111: error: ‘PyExc_ValueError’ undeclared (first use in this
function)
mcrypt.c:113: error: ‘MCRYPTObject’ has no member named ‘iv_size’
mcrypt.c:117: error: ‘PyExc_TypeError’ undeclared (first use in this
function)
mcrypt.c: In function ‘check_algorithm’:
mcrypt.c:133: warning: implicit declaration of function ‘strcmp’
mcrypt.c: In function ‘check_key’:
mcrypt.c:167: error: ‘PyExc_ValueError’ undeclared (first use in this
function)
mcrypt.c:171: error: ‘MCRYPTObject’ has no member named ‘thread’
mcrypt.c:180: error: ‘MCRYPTObject’ has no member named ‘thread’
mcrypt.c: In function ‘init_mcrypt’:
mcrypt.c:208: error: ‘MCRYPTObject’ has no member named ‘init’
mcrypt.c:225: error: ‘MCRYPTObject’ has no member named ‘init’
mcrypt.c:230: error: ‘MCRYPTError’ undeclared (first use in this
function)
mcrypt.c:258: error: ‘MCRYPTObject’ has no member named ‘thread’
mcrypt.c:258: error: ‘MCRYPTObject’ has no member named ‘init_iv’
mcrypt.c:259: error: ‘MCRYPTObject’ has no member named ‘iv_size’
mcrypt.c:261: error: ‘MCRYPTObject’ has no member named ‘init’
mcrypt.c:263: error: ‘MCRYPTObject’ has no member named ‘thread’
mcrypt.c:266: error: ‘MCRYPTObject’ has no member named ‘thread’
mcrypt.c:267: error: ‘MCRYPTObject’ has no member named ‘init_key’
mcrypt.c:268: error: ‘MCRYPTObject’ has no member named
‘init_key_size’
mcrypt.c:269: error: ‘MCRYPTObject’ has no member named ‘init_iv’
mcrypt.c:271: error: ‘MCRYPTObject’ has no member named ‘init’
mcrypt.c:272: warning: implicit declaration of function ‘PyMem_Free’
mcrypt.c:272: error: ‘MCRYPTObject’ has no member named ‘init_iv’
mcrypt.c:273: error: ‘MCRYPTObject’ has no member named ‘init_key’
mcrypt.c:274: error: ‘MCRYPTObject’ has no member named ‘init_iv’
mcrypt.c:275: error: ‘MCRYPTObject’ has no member named ‘init_key’
mcrypt.c:276: error: ‘MCRYPTObject’ has no member named
‘init_key_size’
mcrypt.c:279: error: ‘MCRYPTObject’ has no member named ‘init’
mcrypt.c:282: error: ‘MCRYPTObject’ has no member named ‘init’
mcrypt.c:283: error: ‘MCRYPTObject’ has no member named ‘init_iv’
mcrypt.c:284: error: ‘MCRYPTObject’ has no member named ‘init_key’
mcrypt.c:285: error: ‘MCRYPTObject’ has no member named ‘init_iv’
mcrypt.c:286: error: ‘MCRYPTObject’ has no member named ‘init_key’
mcrypt.c:287: error: ‘MCRYPTObject’ has no member named
‘init_key_size’
mcrypt.c:290: error: ‘MCRYPTObject’ has no member named ‘thread’
mcrypt.c:297: error: ‘MCRYPTObject’ has no member named ‘init_key’
mcrypt.c:297: warning: implicit declaration of function ‘PyMem_Malloc’
mcrypt.c:298: error: ‘MCRYPTObject’ has no member named ‘init_key’
mcrypt.c:299: warning: implicit declaration of function
‘PyErr_NoMemory’
mcrypt.c:302: warning: implicit declaration of function ‘memcpy’
mcrypt.c:302: warning: incompatible implicit declaration of built-in
function ‘memcpy’
mcrypt.c:302: error: ‘MCRYPTObject’ has no member named ‘init_key’
mcrypt.c:303: error: ‘MCRYPTObject’ has no member named ‘init_iv’
mcrypt.c:303: error: ‘MCRYPTObject’ has no member named ‘iv_size’
mcrypt.c:304: error: ‘MCRYPTObject’ has no member named ‘init_iv’
mcrypt.c:309: error: ‘MCRYPTObject’ has no member named ‘init_iv’
mcrypt.c:309: error: ‘MCRYPTObject’ has no member named ‘iv_size’
mcrypt.c:311: warning: implicit declaration of function ‘memset’
mcrypt.c:311: warning: incompatible implicit declaration of built-in
function ‘memset’
mcrypt.c:311: error: ‘MCRYPTObject’ has no member named ‘init_iv’
mcrypt.c:311: error: ‘MCRYPTObject’ has no member named ‘iv_size’
mcrypt.c:313: error: ‘MCRYPTObject’ has no member named ‘thread’
mcrypt.c:316: error: ‘MCRYPTObject’ has no member named ‘init_iv’
mcrypt.c:317: error: ‘MCRYPTObject’ has no member named ‘init_key’
mcrypt.c:318: error: ‘MCRYPTObject’ has no member named ‘init_iv’
mcrypt.c:319: error: ‘MCRYPTObject’ has no member named ‘init_key’
mcrypt.c:322: error: ‘MCRYPTObject’ has no member named
‘init_key_size’
mcrypt.c:323: error: ‘MCRYPTObject’ has no member named ‘init’
mcrypt.c: In function ‘MCRYPT_dealloc’:
mcrypt.c:332: error: ‘MCRYPTObject’ has no member named ‘thread’
mcrypt.c:333: error: ‘MCRYPTObject’ has no member named ‘init’
mcrypt.c:335: warning: implicit declaration of function ‘PyErr_Clear’
mcrypt.c:337: error: ‘MCRYPTObject’ has no member named ‘thread’
mcrypt.c:338: warning: incompatible implicit declaration of built-in
function ‘free’
mcrypt.c:338: error: ‘MCRYPTObject’ has no member named ‘algorithm’
mcrypt.c:339: error: ‘MCRYPTObject’ has no member named ‘mode’
mcrypt.c:341: error: ‘MCRYPTObject’ has no member named ‘ob_type’
mcrypt.c:341: error: ‘PyObject’ undeclared (first use in this
function)
mcrypt.c:341: error: expected expression before ‘)’ token
mcrypt.c: At top level:
mcrypt.c:345: error: expected declaration specifiers or ‘...’ before
‘PyObject’
mcrypt.c:345: error: expected declaration specifiers or ‘...’ before
‘PyObject’
mcrypt.c: In function ‘MCRYPT__init__’:
mcrypt.c:351: error: ‘PyObject’ undeclared (first use in this
function)
mcrypt.c:351: error: ‘aobj’ undeclared (first use in this function)
mcrypt.c:352: error: ‘mobj’ undeclared (first use in this function)
mcrypt.c:357: warning: implicit declaration of function
‘PyArg_ParseTupleAndKeywords’
mcrypt.c:357: error: ‘args’ undeclared (first use in this function)
mcrypt.c:357: error: ‘kwargs’ undeclared (first use in this function)
mcrypt.c:363: error: ‘Py_None’ undeclared (first use in this function)
mcrypt.c:368: error: ‘PyExc_TypeError’ undeclared (first use in this
function)
mcrypt.c:389: error: ‘MCRYPTError’ undeclared (first use in this
function)
mcrypt.c:411: error: ‘MCRYPTObject’ has no member named ‘thread’
mcrypt.c:413: error: ‘MCRYPTObject’ has no member named ‘thread’
mcrypt.c:418: error: ‘MCRYPTObject’ has no member named ‘block_mode’
mcrypt.c:418: error: ‘MCRYPTObject’ has no member named ‘thread’
mcrypt.c:419: error: ‘MCRYPTObject’ has no member named ‘block_mode’
mcrypt.c:420: error: ‘MCRYPTObject’ has no member named ‘thread’
mcrypt.c:423: error: ‘MCRYPTObject’ has no member named ‘block_size’
mcrypt.c:423: error: ‘MCRYPTObject’ has no member named ‘thread’
mcrypt.c:424: error: ‘MCRYPTObject’ has no member named ‘block_size’
mcrypt.c:425: error: ‘MCRYPTObject’ has no member named ‘thread’
mcrypt.c:428: error: ‘MCRYPTObject’ has no member named ‘iv_size’
mcrypt.c:428: error: ‘MCRYPTObject’ has no member named ‘thread’
mcrypt.c:429: error: ‘MCRYPTObject’ has no member named ‘iv_size’
mcrypt.c:430: error: ‘MCRYPTObject’ has no member named ‘thread’
mcrypt.c:434: error: ‘MCRYPTObject’ has no member named ‘algorithm’
mcrypt.c:434: warning: incompatible implicit declaration of built-in
function ‘strdup’
mcrypt.c:435: error: ‘MCRYPTObject’ has no member named ‘mode’
mcrypt.c: At top level:
mcrypt.c:458: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘*’ token
mcrypt.c:491: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘*’ token
mcrypt.c:511: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘*’ token
mcrypt.c:535: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘*’ token
mcrypt.c:597: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘*’ token
mcrypt.c:668: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘*’ token
mcrypt.c:806: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘*’ token
mcrypt.c:940: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘*’ token
mcrypt.c:954: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘*’ token
mcrypt.c:972: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘*’ token
mcrypt.c:1002: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘*’ token
mcrypt.c:1023: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘*’ token
mcrypt.c:1039: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘*’ token
mcrypt.c:1056: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘*’ token
mcrypt.c:1070: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘*’ token
mcrypt.c:1079: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘MCRYPT_methods’
mcrypt.c:1164: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘PyTypeObject’
mcrypt.c:1212: error: expected ‘)’ before ‘*’ token
mcrypt.c:1236: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘*’ token
mcrypt.c:1266: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘*’ token
mcrypt.c:1300: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘*’ token
mcrypt.c:1348: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘*’ token
mcrypt.c:1397: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘*’ token
mcrypt.c:1430: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘*’ token
mcrypt.c:1463: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘*’ token
mcrypt.c:1496: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘*’ token
mcrypt.c:1531: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘*’ token
mcrypt.c:1567: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘*’ token
mcrypt.c:1605: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘mcrypt_methods’
mcrypt.c:1705: warning: return type defaults to ‘int’
mcrypt.c: In function ‘DL_EXPORT’:
mcrypt.c:1705: error: expected declaration specifiers before
‘initmcrypt’
mcrypt.c:1768: error: expected ‘{’ at end of input
error: command 'gcc' failed with exit status 1



More information about the Python-list mailing list