cc1:错误:无法识别的命令行选项"-Wno-null-conversion"在Mac 10.7.5上安装python-mysql时 [英] cc1: error: unrecognized command line option "-Wno-null-conversion" within installing python-mysql on mac 10.7.5

查看:325
本文介绍了cc1:错误:无法识别的命令行选项"-Wno-null-conversion"在Mac 10.7.5上安装python-mysql时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

此错误中断了我在Mac 10.7.5上的python-mysql安装.这是步骤

This error broke my python-mysql installation on Mac 10.7.5. Here are the steps

  1. 已安装的python是2.7.1,mysql是64位(对于5.6.11).
  2. 正在安装的python-mysql是1.2.4,也尝试过1.2.3
  3. 安装配置

  1. The installed python is 2.7.1, mysql is 64 bit for 5.6.11.
  2. The being installed python-mysql is 1.2.4, also tried 1.2.3
  3. Configurations for the installation

1) sudo ln -s /usr/local/mysql/lib /usr/local/mysql/lib/mysql
2) Edit the setup_posix.py and change the following mysql_config.path = "mysql_config" to mysql_config.path = "/usr/local/mysql/bin/mysql_config" 
3) sudo python setup.py build

这是构建的堆栈跟踪

running build
running build_py
copying MySQLdb/release.py -> build/lib.macosx-10.7-intel-2.7/MySQLdb
running build_ext
building '_mysql' extension
llvm-gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -pipe -Dversion_info=(1,2,4,'final',1) -D__version__=1.2.4 -I/usr/local/mysql/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _mysql.c -o build/temp.macosx-10.7-intel-2.7/_mysql.o -Wno-null-conversion -Os -g -fno-strict-aliasing -arch x86_64
cc1: error: unrecognized command line option "-Wno-null-conversion"
error: command 'llvm-gcc-4.2' failed with exit status 1

欢迎您提出建议和想法.谢谢.

Welcome your suggestions and ideas. Thanks.

推荐答案

尝试删除

/usr/local/mysql/bin/mysql_config.

喜欢:

cflags="-I$pkgincludedir  -Wall   -Os -g -fno-strict-aliasing -DDBUG_OFF -arch x86_64 " #note: end space!

这篇关于cc1:错误:无法识别的命令行选项"-Wno-null-conversion"在Mac 10.7.5上安装python-mysql时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆