一位 friend 试图安装 pycrypto,但我们收到了这个完全没有意义的错误。
dell102:/tmp/python/pycrypto-2.6.1 # python setup.py install
running install
running build
running build_py
running build_ext
running build_configure
warning: GMP or MPIR library not found; Not building Crypto.PublicKey._fastmath.
building 'Crypto.Hash._MD2' extension
gcc -pthread -fno-strict-aliasing -march=i586 -mtune=i686 -fmessage-length=0 -Wall - D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -fwrapv - fPIC -std=c99 -O3 -fomit-frame-pointer -Isrc/ -I/usr/include/python2.6 -c src/MD2.c -o build/temp.linux-i686-2.6/src/MD2.o
src/MD2.c:31:20: error: Python.h: No such file or directory
src/MD2.c:131: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
In file included from src/MD2.c:147:
src/hash_template.c:48: error: expected specifier-qualifier-list before ‘PyObject_HEAD’
src/hash_template.c:59: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘PyTypeObject’
src/hash_template.c: In function ‘newALGobject’:
src/hash_template.c:69: warning: implicit declaration of function ‘PyObject_New’
src/hash_template.c:69: error: expected expression before ‘ALGobject’
src/hash_template.c:69: warning: assignment makes pointer from integer without a cast
src/hash_template.c: At top level:
src/hash_template.c:76: error: expected ‘)’ before ‘*’ token
src/hash_template.c:91: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
src/hash_template.c:110: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
src/hash_template.c:122: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
src/hash_template.c:162: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
src/hash_template.c:188: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
src/hash_template.c:190: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or â
src/hash_template.c:304: error: array type has incomplete element type
... and a whole bunch more ...
error: command 'gcc' failed with exit status 1
出现这种情况的原因是没有安装 python-devel。只是想我会分享。
出现这种情况的原因是没有安装 python-devel。
我是一名优秀的程序员,十分优秀!