xcode – 在Mac OS X Lion上缺少llvm-gcc:无法安装mysql-python
发布时间:2020-12-14 18:57:37 所属栏目:百科 来源:网络整理
导读:我最近从10.6升级到Mac OS X 10.7. 我决定使用Python 2.7. 但是当我尝试安装MySQLdb模块来运行Django时,它失败了: $sudo pip install MySQL-pythonDownloading/unpacking MySQL-python […] Running setup.py install for MySQL-python building '_mysql' e
我最近从10.6升级到Mac OS X 10.7.
我决定使用Python 2.7. 但是当我尝试安装MySQLdb模块来运行Django时,它失败了: $sudo pip install MySQL-python Downloading/unpacking MySQL-python […] Running setup.py install for MySQL-python 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,3,'final',0) -D__version__=1.2.3 -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 -Os -g -fno-common -fno-strict-aliasing -arch x86_64 unable to execute llvm-gcc-4.2: No such file or directory error: command 'llvm-gcc-4.2' failed with exit status 1 Complete output from command /usr/bin/python -c "import setuptools;__file__='~/Sites/gugsm/build/MySQL-python/setup.py';exec(compile(open(__file__).read().replace('rn','n'),__file__,'exec'))" install --single-version-externally-managed --record /tmp/pip-AwMuqj-record/install-record.txt: running install running build […] building '_mysql' extension creating build/temp.macosx-10.7-intel-2.7 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,0) -D__version__=1.2.3 -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 -Os -g -fno-common -fno-strict-aliasing -arch x86_64 unable to execute llvm-gcc-4.2: No such file or directory error: command 'llvm-gcc-4.2' failed with exit status 1 ---------------------------------------- 原因是我不再拥有llvm-gcc和gcc二进制文件. 我试图将XCode从3.something升级到4.3.2,但它没有帮助.它是一个简单的应用程序,它不会使用llvm-gcc填充/usr/bin. 我究竟做错了什么? 解决方法
在Xcode 4.3的“首选项”菜单中,选择“下载”,然后安装“命令行工具”.
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |