日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 人文社科 > 生活经验 >内容正文

生活经验

python mysql gcc_MySQL-python “error: command 'gcc' failed with exit status 1”错误

發(fā)布時(shí)間:2023/11/27 生活经验 27 豆豆
生活随笔 收集整理的這篇文章主要介紹了 python mysql gcc_MySQL-python “error: command 'gcc' failed with exit status 1”错误 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

安裝MySQL-python-1.2.3c1出現(xiàn)“error: command 'gcc' failed with exit status 1”錯(cuò)誤

具體報(bào)錯(cuò)信息如下:

_mysql.c: 在文件層:

_mysql.c:2330: 錯(cuò)誤:‘_mysql_ConnectionObject’沒有名為‘open’的成員

_mysql.c:2337: 錯(cuò)誤:‘_mysql_ConnectionObject’沒有名為‘converter’的成員

_mysql.c:2344: 錯(cuò)誤:‘_mysql_ConnectionObject’沒有名為‘connection’的成員

_mysql.c:2351: 錯(cuò)誤:‘_mysql_ConnectionObject’沒有名為‘connection’的成員

_mysql.c:2358: 錯(cuò)誤:‘_mysql_ConnectionObject’沒有名為‘connection’的成員

_mysql.c:2421: 錯(cuò)誤:‘_mysql_ResultObject’沒有名為‘converter’的成員

_mysql.c:2421: 錯(cuò)誤:初始值設(shè)定元素不是常量

_mysql.c:2421: 錯(cuò)誤:(在‘_mysql_ResultObject_memberlist[0].offset’的初始化附近)

_mysql.c: 在函數(shù)‘_mysql_ConnectionObject_getattr’中:

_mysql.c:2443: 錯(cuò)誤:‘_mysql_ConnectionObject’沒有名為‘open’的成員

error: command 'gcc' failed with exit status 1

環(huán)境為:

系統(tǒng)版本:ORALCE_RHEL6

Python版本:2.7.8

Mysql-python的site.cfg文件內(nèi)容如下:

[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 = False

threadsafe = 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

已經(jīng)安裝:

[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

現(xiàn)在應(yīng)該如何解決呢?

——————

最后還是被我自己解決了,在windows下已經(jīng)安裝過MySQLdb了,但是在linux下安裝不成功,很懊惱。

現(xiàn)在寫下解決方法(還是走了很多彎路,好年輕啊!!!):

安裝所有的依賴:

yum install python-devel mysql-devel zlib-devel openssl-devel

總結(jié)

以上是生活随笔為你收集整理的python mysql gcc_MySQL-python “error: command 'gcc' failed with exit status 1”错误的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。