【问题标题】:Errors building mysqldb on Mac OS 10.7, Python 2.7.1在 Mac OS 10.7、Python 2.7.1 上构建 mysqldb 时出错
【发布时间】:2012-05-07 12:22:13
【问题描述】:

我正在尝试构建 MySQLdb 1.2.3。我编辑了构建配置以设置 threadsafe = False,现在,当我构建时,我看到以下内容:

一长串警告 ala

_mysql.c:986: warning: implicit conversion shortens 64-bit value into a 32-bit value

最后一个 llvm 崩溃:

lipo: /var/folders/fk/648y1j5d0c94ljvc5k0xncmh0000gt/T//ccoAI1iz.out and /var/folders/fk/648y1j5d0c94ljvc5k0xncmh0000gt/T//cc9fJKgC.out have the same architectures (x86_64) and can't be in the same fat output file
error: command 'llvm-gcc-4.2' failed with exit status 1

是否有解决这些问题的快速解决方法?

【问题讨论】:

    标签: python macos mysql-python


    【解决方案1】:

    看起来这是由我正在构建的库版本、python 版本和/或系统上的 mysql 版本不匹配引起的问题。

    我通过确保所有版本都匹配 64 位并运行来纠正它

    ARCHFLAGS="-arch x86_64" python setup.py build
    

    推荐here

    【讨论】: