在Linux Centos 4.3上安装MySQL-python-1.2.3的时候出现error: command 'gcc' failed with exit status 1,

具体原因是因为没有安装mysql-devel包

使用yum install mysql-devel成功解决。

才想起来在运行python setup.py build 的时候先报一个错误,是因为没有安装setuptools。

得先安装一个setuptools-0.6c11就好了。具体步骤如下:

需要的软件包:setuptools-0.6c11.tar.gz 
                     MySQL-python-1.2.3.tar.gz
               
1.安装setuptools-0.6c11
wget --no-check-certificate  http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz
tar zxf setuptools-0.6c11.tar.gz && cd setuptools-0.6c11
python setup.py build
python setup.py install

2.安装MySQL-python-1.2.3
wget http://sourceforge.net/projects/mysql-python/files/mysql-python/1.2.3/MySQL-python-1.2.3.tar.gz/download
tar zxf MySQL-python-1.2.3.tar.gz && cd MySQL-python-1.2.3
python setup.py build
python setup.py install

Centos4.3安装MySQL-python-1.2.3,出现error: command 'gcc' failed with exit status 1的更多相关文章

  1. python psutil 编译中断。 error: command 'gcc' failed with exit status 1

    error info [root@chenbj psutil-2.0.0]# python setup.py install running install running bdist_egg run ...

  2. Python 安装出错:Setup script exited with error: command 'gcc' failed with exit status 1

    退出当前环境: logout (再重新登录进去) yum install python-devel  -yyum install libevent-devel  -y 把环境更新下yum instal ...

  3. python安装模块的时候报错error: command 'gcc' failed with exit status 1

    [情况] 在写Python代码的时候,需要用到psutil模块,需要安装. 但是在安装时,报错:error: command 'gcc' failed with exit status 1 [解决步骤 ...

  4. centos7 安装mysql--python模块出现EnvironmentError: mysql_config not found和error: command 'gcc' failed with exit status 1

    要想使python可以操作mysql 就需要MySQL-python驱动,它是python 操作mysql必不可少的模块. 下载地址:https://pypi.python.org/pypi/MySQ ...

  5. pip安装模块时:error: command 'gcc' failed with exit status 1

    用安装python模块出现error: command 'gcc' failed with exit status 1 问题: gcc编译缺少模块 解决方法: yum install gcc libf ...

  6. python模块安装报错 :error: command 'gcc' failed with exit status 1

    参考:http://blog.csdn.net/fenglifeng1987/article/details/38057193 解决方法 yum install gcc libffi-devel py ...

  7. CentOs安装Scrapy出现error: Setup script exited with error: command ‘gcc’ failed with exit status 1错误解决方案

    按照 http://www.1207.me/archives/209.html 的教程安装Scrapy出现了上述错误,但是本身机器已经有了gcc,所以应该是安装包的问题 百度又看到了同博客里的解决方案 ...

  8. centos7.2安装paramiko报error: command 'gcc' failed with exit status 1的解决办法

    安装依赖 yum install kernel-devel libxslt-devel libffi-devel python-devel mysql-devel zlib-devel openssl ...

  9. 安装python-MySQLdb 出现error: command 'gcc' failed with exit status 1的解决方法

    >>> yum install MySQL-p* >>>yum install python-devel >>>cd MySQL-python-1 ...

随机推荐

  1. c#重要特性之一委托

    委托的构成必须满足的4个条件: 声明委托类型: 必须有一个方法包含了要执行的代码: 必须创建一个委托实例: 必须调用(invoke)委托实例 委托包装的方法需要满足以下条件 方法的签名必须与委托一致, ...

  2. 学习块格式化上下文(BlockFormattingContext)

    什么是BFC BFC全称是Block Formatting Context,即块格式化上下文.它是CSS2.1规范定义的,关于CSS渲染定位的一个概念.要明白BFC到底是什么,首先来看看什么是视觉格式 ...

  3. SVG实现描边动画

    说起SVG,我是恨它又爱它,恨它是因为刚开始接触的时候自己傻B地想用代码去写它,其实在web上我们用它做交互也只是用了几个常用的特性而已,其他的标签知道这么一回事就成了,其实说白了它就是一种图片格式, ...

  4. CICS定时

    F+14个0-----给CICS传参数FM CICSServer svr;        svr.GetRetCommData(&pMsgStr, &chMsgType); CICSS ...

  5. Sicily 1510欢迎提出优化方案

    这道题我觉得是除1000(A-B)外最简单的题了……不过还是提出一个小问题:在本机用gcc编译的时候我没包括string.h头文件,通过编译,为什么在sicily上却编译失败? 1510. Mispe ...

  6. 代C语言上机实践

    这已经是开学第十二周了,个人感觉严老师教的这批学生效果不是很好,有的竟然毫不知道main函数前边的 int是做什么的.只知按照书本上给的样例程序一个字一个字的敲到编译器中,然后点击运行.有错误也不知道 ...

  7. OpenSessionInViewFilter与org.springframework.dao.InvalidDataAccessApiUsageException

    报错:org.springframework.dao.InvalidDataAccessApiUsageException: Write operations are not allowed in r ...

  8. Educational Codeforces Round 7 F - The Sum of the k-th Powers 拉格朗日插值

    The Sum of the k-th Powers There are well-known formulas: , , . Also mathematicians found similar fo ...

  9. 【BZOJ】1001: [BeiJing2006]狼抓兔子 Dinic算法求解平面图对偶图-最小割

    1001: [BeiJing2006]狼抓兔子 Description 左上角点为(1,1),右下角点为(N,M)(上图中N=4,M=5).有以下 三种类型的道路 1:(x,y)<==>( ...

  10. merge into 和 update 的效率对比

    以前只考虑 merge into 只是在特定场合下方便才使用的,今天才发现,merge into 竟然会比 update 在更新数据时有这么大的改进.其实呢,merge into部分的update和u ...