MySQL-python,错误:命令’gcc-4.2’失败,退出状态为1
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了MySQL-python,错误:命令’gcc-4.2’失败,退出状态为1,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含2114字,纯文字阅读大概需要4分钟。
内容图文
![MySQL-python,错误:命令’gcc-4.2’失败,退出状态为1](/upload/InfoBanner/zyjiaocheng/902/261595b7b857428d8b11093357885a3e.jpg)
我一直在寻找解决方案,似乎有很多不同的解决方案,但似乎都没有.
我正在使用MySQL–Python尝试使用python设置MySQL.但是,当我试图跑
sudo python setup.py build
我收到以下错误:
Password:
running build
running build_py
copying MySQLdb/release.py -> build/lib.macosx-10.6-intel-2.7/MySQLdb
running build_ext
building '_mysql' extension
gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -isysroot /Developer/SDKs/MacOSX10.6.sdk -g -O2 -DNDEBUG -g -O3 -Dversion_info=(1,2,3,'final',0) -D__version__=1.2.3 -I/usr/local/mysql-5.5.21-osx10.6-x86/include -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _mysql.c -o build/temp.macosx-10.6-intel-2.7/_mysql.o -Os -g -fno-common -fno-strict-aliasing -arch i386
In file included from /Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/unicodeobject.h:4,
from /Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:85,
from pymemcompat.h:10,
from _mysql.c:29:
/Developer/SDKs/MacOSX10.6.sdk/usr/include/stdarg.h:4:25: error: stdarg.h: No such file or directory
In file included from _mysql.c:36:
/usr/local/mysql-5.5.21-osx10.6-x86/include/my_config.h:329:1: warning: "SIZEOF_SIZE_T" redefined
In file included from /Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:9,
from pymemcompat.h:10,
from _mysql.c:29:
/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/pymacconfig.h:56:1: warning: this is the location of the previous definition
In file included from _mysql.c:36:
/usr/local/mysql-5.5.21-osx10.6-x86/include/my_config.h:422:1: warning: "HAVE_WCSCOLL" redefined
In file included from /Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:8,
from pymemcompat.h:10,
from _mysql.c:29:
/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/pyconfig.h:887:1: warning: this is the location of the previous definition
error: command 'gcc-4.2' failed with exit status 1
解决方法:
我有同样的问题.经过几个小时的挣扎,我已成功使用ActivePython(http://code.activestate.com/pypm/mysql-python/)安装MySQL-python.虽然它不能完全解决您的错误,但它解决了整体问题:)
内容总结
以上是互联网集市为您收集整理的MySQL-python,错误:命令’gcc-4.2’失败,退出状态为1全部内容,希望文章能够帮你解决MySQL-python,错误:命令’gcc-4.2’失败,退出状态为1所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。