src/MD2.c:31:20: 错误:Python.h:没有那个文件或目录
一、前言
在CentOS 上安装fabric时出现问题,首先已安装pip, 用pip执行以下命令pip install
出现以下问题
- [niy@niy-computer /]$ sudo pip install fabric
 - Requirement already satisfied (use --upgrade to upgrade): fabric in /usr/lib/python2.6/site-packages/Fabric-1.3.1-py2.6.egg
 - Requirement already satisfied (use --upgrade to upgrade): ssh>=1.7.8 in /usr/lib/python2.6/site-packages/ssh-1.8.0-py2.6.egg (from fabric)
 - Downloading/unpacking pycrypto>=2.1,!=2.4 (from ssh>=1.7.8->fabric)
 - Running setup.py egg_info for package pycrypto
 - Installing collected packages: pycrypto
 - Found existing installation: pycrypto 2.0.1
 - Uninstalling pycrypto:
 - Successfully uninstalled pycrypto
 - Running setup.py install for pycrypto
 - warning: GMP or MPIR library not found; Not building Crypto.PublicKey._fastmath.
 - building 'Crypto.Hash._MD2' extension
 - gcc -pthread -fno-strict-aliasing -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -D_GNU_SOURCE -fPIC -fwrapv -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -D_GNU_SOURCE -fPIC -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: 错误:Python.h:没有那个文件或目录
 - src/MD2.c:131: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
 - In file included from src/MD2.c:147:
 - src/hash_template.c:48: 错误:expected specifier-qualifier-list before ‘PyObject_HEAD’
 - src/hash_template.c:59: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘PyTypeObject’
 - src/hash_template.c: 在函数‘newALGobject’中:
 - src/hash_template.c:69: 警告:隐式声明函数‘PyObject_New’
 - src/hash_template.c:69: 错误:expected expression before ‘ALGobject’
 - src/hash_template.c: 在文件层:
 - src/hash_template.c:76: 错误:expected ‘)’ before ‘*’ token
 - src/hash_template.c:91: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
 - src/hash_template.c:110: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
 - src/hash_template.c:122: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
 - src/hash_template.c:162: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
 - src/hash_template.c:188: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
 - src/hash_template.c:190: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘ALG_methods’
 - src/hash_template.c:199: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
 - src/hash_template.c:225: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘ALGtype’
 - src/hash_template.c:271: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
 - src/hash_template.c:304: 错误:数组元素的类型不完全
 - src/hash_template.c:305: 错误:‘PyCFunction’未声明(不在函数内)
 - src/hash_template.c:305: 错误:expected ‘}’ before ‘ALG_new’
 - src/hash_template.c: 在函数‘init_MD2’中:
 - src/hash_template.c:339: 错误:‘PyObject’未声明(在此函数内第一次使用)
 - src/hash_template.c:339: 错误:(即使在一个函数内多次出现,每个未声明的标识符在其
 - src/hash_template.c:339: 错误:所在的函数内也只报告一次。)
 - src/hash_template.c:339: 错误:‘m’未声明(在此函数内第一次使用)
 - src/hash_template.c:351: 错误:‘ALGtype’未声明(在此函数内第一次使用)
 - src/hash_template.c:351: 错误:‘PyType_Type’未声明(在此函数内第一次使用)
 - src/hash_template.c:352: 警告:隐式声明函数‘Py_InitModule’
 - src/hash_template.c:356: 错误:‘o’未声明(在此函数内第一次使用)
 - src/hash_template.c:356: 警告:隐式声明函数‘PyInt_FromLong’
 - src/hash_template.c:356: 警告:隐式声明函数‘PyDict_SetItemString’
 - src/hash_template.c:356: 警告:隐式声明函数‘PyModule_GetDict’
 - src/hash_template.c:356: 警告:隐式声明函数‘Py_DECREF’
 - src/hash_template.c:360: 警告:隐式声明函数‘PyErr_Occurred’
 - src/hash_template.c:361: 警告:隐式声明函数‘Py_FatalError’
 - error: command 'gcc' failed with exit status 1
 - Complete output from command /usr/bin/python -c "import setuptools;__file__='/tmp/pip-build-root/pycrypto/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-Ai6cQR-record/install-record.txt --single-version-externally-managed:
 - 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 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -D_GNU_SOURCE -fPIC -fwrapv -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -D_GNU_SOURCE -fPIC -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: 错误:Python.h:没有那个文件或目录
 - src/MD2.c:131: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
 - In file included from src/MD2.c:147:
 - src/hash_template.c:48: 错误:expected specifier-qualifier-list before ‘PyObject_HEAD’
 - src/hash_template.c:59: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘PyTypeObject’
 - src/hash_template.c: 在函数‘newALGobject’中:
 - src/hash_template.c:69: 警告:隐式声明函数‘PyObject_New’
 - src/hash_template.c:69: 错误:expected expression before ‘ALGobject’
 - src/hash_template.c: 在文件层:
 - src/hash_template.c:76: 错误:expected ‘)’ before ‘*’ token
 - src/hash_template.c:91: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
 - src/hash_template.c:110: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
 - src/hash_template.c:122: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
 - src/hash_template.c:162: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
 - src/hash_template.c:188: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
 - src/hash_template.c:190: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘ALG_methods’
 - src/hash_template.c:199: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
 - src/hash_template.c:225: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘ALGtype’
 - src/hash_template.c:271: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
 - src/hash_template.c:304: 错误:数组元素的类型不完全
 - src/hash_template.c:305: 错误:‘PyCFunction’未声明(不在函数内)
 - src/hash_template.c:305: 错误:expected ‘}’ before ‘ALG_new’
 - src/hash_template.c: 在函数‘init_MD2’中:
 - src/hash_template.c:339: 错误:‘PyObject’未声明(在此函数内第一次使用)
 - src/hash_template.c:339: 错误:(即使在一个函数内多次出现,每个未声明的标识符在其
 - src/hash_template.c:339: 错误:所在的函数内也只报告一次。)
 - src/hash_template.c:339: 错误:‘m’未声明(在此函数内第一次使用)
 - src/hash_template.c:351: 错误:‘ALGtype’未声明(在此函数内第一次使用)
 - src/hash_template.c:351: 错误:‘PyType_Type’未声明(在此函数内第一次使用)
 - src/hash_template.c:352: 警告:隐式声明函数‘Py_InitModule’
 - src/hash_template.c:356: 错误:‘o’未声明(在此函数内第一次使用)
 - src/hash_template.c:356: 警告:隐式声明函数‘PyInt_FromLong’
 - src/hash_template.c:356: 警告:隐式声明函数‘PyDict_SetItemString’
 - src/hash_template.c:356: 警告:隐式声明函数‘PyModule_GetDict’
 - src/hash_template.c:356: 警告:隐式声明函数‘Py_DECREF’
 - src/hash_template.c:360: 警告:隐式声明函数‘PyErr_Occurred’
 - src/hash_template.c:361: 警告:隐式声明函数‘Py_FatalError’
 - error: command 'gcc' failed with exit status 1
 - ----------------------------------------
 - Rolling back uninstall of pycrypto
 - Command /usr/bin/python -c "import setuptools;__file__='/tmp/pip-build-root/pycrypto/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-Ai6cQR-record/install-record.txt --single-version-externally-managed failed with error code 1 in /tmp/pip-build-root/pycrypto
 - Storing complete log in /root/.pip/pip.log
 
二 解决方案
原因是少了Python的dev
- [niy@niy-computer /]$ sudo yum install python-devel
 
src/MD2.c:31:20: 错误:Python.h:没有那个文件或目录的更多相关文章
- qingstor python-sdk 安装错误 src/MD2.c:31:20: fatal error: Python.h: No such file or directory
		
ubuntu安装python qingstor-sdk, src/MD2.c:31:20: fatal error: Python.h: No such file or directory compi ...
 - 解决 src/MD2.c:31:20: fatal error: Python.h: No such file or directory安装包错误
		
在linux命令行安装包时报错 src/MD2.c:31:20: fatal error: Python.h: No such file or directory 原因:缺少了python的dev 解 ...
 - python.h没有那个文件或目录解决方法
		
我用的是Deepin Linux,这应该是linux平台的问题,别的linux os也是执行安装,命令不同而已,windows和Mac不太清楚. 如果你使用的是python2.x,那么使用下面的语句: ...
 - _mysql.c:29:20: error: Python.h: No such file or directory
		
在Centos系统中安装 pip install MySQL-python 提示: _mysql.c:29:20: error: Python.h: No such file or directory ...
 - busybox编译 fatal error: curses.h: 没有那个文件或目录解决办法
		
执行make menuconfig时出现如下错误@ubuntu:/home/dev/busybox-1.19.3# make menuconfig HOSTCC scripts/kconfig/lxd ...
 - fatal error: openssl/evp.h: 没有那个文件或目录
		
在陆佳华<嵌入式系统软硬件协同设计实战指南 第2版>一书的第13章节 编译U-boot时会遇到2个错误.原因很简单,就从一开始的错误提示着手: fatal error: openssl/e ...
 - 【caffe编译】 fatal error: hdf5.h: 没有那个文件或目录
		
src/caffe/layers/hdf5_output_layer.cpp:3:18: fatal error: hdf5.h: 没有那个文件或目录 查找文件 locate hdf5.h 修改Mak ...
 - error: stdio.h: 没有那个文件或目录
		
在64位系统中,编写一个C语言程序后,使用gcc进行编译时,出现了如下的错误: test.c:1:19: fatal error: stdio.h: 没有那个文件或目录 #include <s ...
 - fastdfs+nginx make时报错fatal error:fdfs_define.h: 没有那个文件或目录
		
环境: ubuntu 18.04.1 fastdfs-nginx-module_v1.16 root@wang-machine:~/桌面/FastDFS# cd nginx-1.8.1/root@wa ...
 
随机推荐
- poj2728 Desert King(最小生成树+01分数规划=最优比率生成树)
			
题意 n个点完全图,每个边有两个权值,求分数规划要求的东西的最小值. (n<=1000) 题解 心态炸了. 堆优化primT了. 普通的就过了. 我再也不写prim了!!!! 咳咳 最优比率生成 ...
 - NOIP 2012 疫情控制(二分+贪心+倍增)
			
题解 二分时间 然后一个显然的事是一个军队向上爬的越高它控制的点越多 所以首先军队尽量往上爬. 当一个军队可以爬到根节点我们记录下它的剩余时间T和它到达根结点时经过的根节点的子节点son. 当一个军队 ...
 - 用Python定时爬取网站最新资源
			
记录一下. 写做个网站,爬了另一个网站的内容来做自己网站的内容. 把脚本挂到服务器,每隔一个小时去爬一次资源,然后保存到一个HTML文件里. 用flask做web对接,当有请求的时候就返回那个HTML ...
 - Zookeeper入门-Java版本HelloWorld例子
			
上一篇介绍了,Zookeeper的基本概念,怎么启动,怎么解决可能遇到的几个问题.本篇,根据网上代码,整理了一个例子,Zookeeper的HelloWorld. 下面这个代码,还是比较简单的,核心类就 ...
 - USART
			
串口通信是一种设备间非常常用的串行通行方式,其简单便捷,大部分电子设备都支持. 一.物理层 常用RS-232标准,主要规定了信号的用途.通信接口以及信号的电平标准. “DB9接口”之间通过串口信号线 ...
 - Java基础学习总结(25)——Log4j快速入门教程
			
log4j是一个优秀的日志组件,基本上所有的java开发项目都会用到它.下面将自己学习的一些心得总结一下,方便以后学习. log4j在项目中都不会单独使用,至少是我写过的java项目中没有.一般来说l ...
 - ECNUOJ 2142 放书
			
放书 Time Limit:1000MS Memory Limit:65536KBTotal Submit:409 Accepted:173 Description 你要把一叠书放进一些箱子里面,为 ...
 - Map和Collection详解
			
Collection -----List -----LinkedList 非同步 ----ArrayList 非同 ...
 - ArcGIS api for javascript——地图配置-滑动器的刻度线、方向、大小的改变
			
描述 本例展示了如果删除缩放等级滑动器的刻度线.通过设置esriConfig里的sliderLabel为null来实现: esriConfig.defaults.map.sliderLabel = n ...
 - 最简单的HTML5游戏——贪吃蛇
			
<html> <head> <meta charset="UTF-8"/> <title>贪吃蛇</title> < ...