MySQL-python “error: command 'gcc' failed with exit status 1”错误
来源:互联网 发布:淘宝网改地址 编辑:程序博客网 时间:2024/06/06 10:38
http://segmentfault.com/q/1010000000618370
安装MySQL-python-1.2.3c1出现“error: command 'gcc' failed with exit status 1”错误
具体报错信息如下:
_mysql.c: 在文件层:_mysql.c:2330: 错误:‘_mysql_ConnectionObject’没有名为‘open’的成员_mysql.c:2337: 错误:‘_mysql_ConnectionObject’没有名为‘converter’的成员_mysql.c:2344: 错误:‘_mysql_ConnectionObject’没有名为‘connection’的成员_mysql.c:2351: 错误:‘_mysql_ConnectionObject’没有名为‘connection’的成员_mysql.c:2358: 错误:‘_mysql_ConnectionObject’没有名为‘connection’的成员_mysql.c:2421: 错误:‘_mysql_ResultObject’没有名为‘converter’的成员_mysql.c:2421: 错误:初始值设定元素不是常量_mysql.c:2421: 错误:(在‘_mysql_ResultObject_memberlist[0].offset’的初始化附近)_mysql.c: 在函数‘_mysql_ConnectionObject_getattr’中:_mysql.c:2443: 错误:‘_mysql_ConnectionObject’没有名为‘open’的成员error: command 'gcc' failed with exit status 1
环境为:
系统版本:ORALCE_RHEL6
Python版本:2.7.8
Mysql-python的site.cfg文件内容如下:
[root@oracle MySQL-python-1.2.3c1]# cat site.cfg [options]# embedded: link against the embedded server library# threadsafe: use the threadsafe client# static: link against a static library (probably required for embedded)embedded = Falsethreadsafe = False static = False# The path to mysql_config.# Only use this if mysql_config is not on your PATH, or you have some weird# setup that requires it.mysql_config =/usr/bin/mysql_config# The Windows registry key for MySQL.# This has to be set for Windows builds to work.# Only change this if you have a different version.registry_key = SOFTWARE\MySQL AB\MySQL Server 5.0
已经安装:
[root@oracle Packages]# rpm -ivh python-devel-2.6.6-51.el6.i686.rpm Preparing... ########################################### [100%] 1:python-devel ########################################### [100%][root@oracle Packages]# rpm -ivh MySQL-python-1.2.3-0.3.c1.1.el6.i686.rpm Preparing... ########################################### [100%] 1:MySQL-python ########################################### [100%]
还是存在error: command 'gcc' failed with exit status 1
现在应该如何解决呢?
——————
最后还是被我自己解决了,在windows下已经安装过MySQLdb了,但是在linux下安装不成功,很懊恼。
现在写下解决方法(还是走了很多弯路,好年轻啊!!!):
安装所有的依赖:
yum install gcc python-devel mysql-devel zlib-devel openssl-devel
0 0
- 安装MySQL-python时发生错误:error: command 'gcc' failed with exit status 1
- MySQL-python “error: command 'gcc' failed with exit status 1”错误
- 安装MySQL-python时发生错误:error: command 'gcc' failed with exit status 1
- 关于Python安装模块出现error: command 'gcc' failed with exit status 1错误的解决方法
- [CentOS]安装MySQL-python,error: Setup script exited with error: command 'gcc' failed with exit status
- python 安装superset:error: Setup script exited with error: command 'gcc' failed with exit status 1
- error: command 'gcc' failed with exit status 1
- error: command 'gcc' failed with exit status 1
- error: command 'gcc' failed with exit status 1
- error: command 'gcc' failed with exit status 1 解决方法
- error: command 'gcc' failed with exit status 1 的解决办法
- 【centos】 error: command 'gcc' failed with exit status 1
- error: command 'gcc' failed with exit status 1
- error: command 'gcc' failed with exit status 1
- error: command 'gcc' failed with exit status 1 的解决办法
- centos---error: command 'gcc' failed with exit status 1
- error: command ‘gcc’ failed with exit status 1
- error: command 'gcc' failed with exit status 1
- empty(), is_null(), isset()(区别)
- Uva 1585 score
- github开源php项目
- PHP中可以静态调用非静态方法么?(诡异的调用)
- 【小熊刷题】Convert Sorted List to Balanced Binary Search Tree<可再复习>
- MySQL-python “error: command 'gcc' failed with exit status 1”错误
- php实现post和get
- RPG黑暗之光(4)添加第一个NPC、NGUI实现任务发布
- RPG黑暗之光(5)NGUI实现背包系统初步
- php中static和const
- php中的clone对象
- php中的接口和抽象类
- php对象的序列化(串行化)用作 写入文件或者网络传输
- Unity Game Programming AI(1)人工智能导论