mysql.c 2888 error_设置MySQLdb Modu时出现问题

我想在我的Mac上安装MySQLdb以便连接到一个远程MySQL服务器。在我已经安装了最新的C MySQL客户端库

我已经安装了XCode 4

在安装XCode或客户机库之前,我曾天真地尝试过安装模块

我试图通过在终端中运行以下命令来设置模块:

$sudoPython设置.py建造

$sudoPython设置.py安装

这两个命令都失败,并显示类似的错误消息。以下是第一个堆栈跟踪:running build

running build_py

copying MySQLdb/release.py -> build/lib.macosx-10.6-universal-2.6/MySQLdb

running build_ext

building '_mysql' extension

gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch ppc -arch x86_64 -pipe -Dversion_info=(1,2,3,'final',0) -D__version__=1.2.3 -I/usr/include/mysql -I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c _mysql.c -o build/temp.macosx-10.6-universal-2.6/_mysql.o -fno-omit-frame-pointer -pipe

In file included from _mysql.c:36:

/usr/include/mysql/my_config.h:1030:2: warning: #warning defining SIZEOF_CHARP = 4

/usr/include/mysql/my_config.h:1044:2: warning: #warning defining SIZEOF_LONG = 4

/usr/libexec/gcc/powerpc-apple-darwin10/4.2.1/as: assembler (/usr/bin/../libexec/gcc/darwin/ppc/as or /usr/bin/../local/libexec/gcc/darwin/ppc/as) for architecture ppc not installed

Installed assemblers are:

/usr/bin/../libexec/gcc/darwin/x86_64/as for architecture x86_64

/usr/bin/../libexec/gcc/darwin/i386/as for architecture i386

In file included from _mysql.c:36:

/usr/include/mysql/my_config.h:1030:2: warning: #warning defining SIZEOF_CHARP = 4

/usr/include/mysql/my_config.h:1044:2: warning: #warning defining SIZEOF_LONG = 4

/usr/include/mysql/my_config.h:1151:1: warning: "WORDS_BIGENDIAN" redefined

In file included from /System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/Python.h:8,

from pymemcompat.h:10,

from _mysql.c:29:

/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/pyconfig.h:1014:1: warning: this is the location of the previous definition

_mysql.c:2888: fatal error: error writing to -: Broken pipe

compilation terminated.

In file included from _mysql.c:36:

/usr/include/mysql/my_config.h:1027:2: warning: #warning defining SIZEOF_CHARP = 8

/usr/include/mysql/my_config.h:1041:2: warning: #warning defining SIZEOF_LONG = 8

lipo: can't open input file: /var/tmp//ccU6bipK.out (No such file or directory)

error: command 'gcc-4.2' failed with exit status 1

下面是第二个命令的堆栈跟踪:

^{pr2}$

我已经干了几天了,我开始发疯了。任何帮助将不胜感激!在

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值