GCC 错误:命令“gcc-4.0”失败,退出状态为 1
我正在尝试使用 Xcode 4.2 将 Fabric 安装到 Virtualenv / Django 1.3.1 / OS X Lion 中。这个错误似乎相当普遍但我不能当你运行 Python 2.7 & 时似乎找到了答案。 Xcode 4.2。
我正在运行:
Python 2.7(r27:82508,2010 年 7 月 3 日,21:12:11) [GCC 4.0.1 (Apple Inc. build 5493)]
如何执行 gcc-4.0 而不是 gcc-4.0.1?
谢谢!
完整的 Fabric 安装 + 错误:
Requirement already satisfied (use --upgrade to upgrade): fabric in ./lib/python2.7/site-packages/Fabric-0.1.0-py2.7.egg
Requirement already satisfied (use --upgrade to upgrade): paramiko>=1.7,<2.0 in ./lib/python2.7/site-packages/paramiko-1.7.7.1-py2.7.egg (from fabric)
Downloading/unpacking pycrypto>=2.1 (from paramiko>=1.7,<2.0->fabric)
Running setup.py egg_info for package pycrypto
Installing collected packages: pycrypto
Running setup.py install for pycrypto
warning: GMP or MPIR library not found; Not building Crypto.PublicKey._fastmath.
building 'Crypto.Hash.MD2' extension
gcc-4.0 -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch ppc -arch x86_64 -std=c99 -O3 -fomit-frame-pointer -Isrc/ -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/MD2.c -o build/temp.macosx-10.5-fat3-2.7/src/MD2.o
unable to execute gcc-4.0: No such file or directory
error: command 'gcc-4.0' failed with exit status 1
Complete output from command /Users/emilepetrone/Sites/newsite/salesapp/bin/python -c "import setuptools;__file__='/Users/emilepetrone/Sites/newsite/salesapp/build/pycrypto/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /var/folders/hv/yjvyz6g96xd4c4nbg3hgtk9c0000gn/T/pip-R0wRzk-record/install-record.txt --install-headers /Users/emilepetrone/Sites/newsite/salesapp/bin/../include/site/python2.7:
running install
running build
running build_configure
running build_py
running build_ext
warning: GMP or MPIR library not found; Not building Crypto.PublicKey._fastmath.
building 'Crypto.Hash.MD2' extension
gcc-4.0 -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch ppc -arch x86_64 -std=c99 -O3 -fomit-frame-pointer -Isrc/ -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/MD2.c -o build/temp.macosx-10.5-fat3-2.7/src/MD2.o
unable to execute gcc-4.0: No such file or directory
error: command 'gcc-4.0' failed with exit status 1
I am trying to install Fabric into a Virtualenv / Django 1.3.1 / OS X Lion with Xcode 4.2. This error seems to be fairly prevalent but I can't seem to find an answer when you are running Python 2.7 & Xcode 4.2.
I'm running:
Python 2.7 (r27:82508, Jul 3 2010, 21:12:11)
[GCC 4.0.1 (Apple Inc. build 5493)]
How do I execute gcc-4.0 instead of gcc-4.0.1?
Thanks!
The full Fabric install + error:
Requirement already satisfied (use --upgrade to upgrade): fabric in ./lib/python2.7/site-packages/Fabric-0.1.0-py2.7.egg
Requirement already satisfied (use --upgrade to upgrade): paramiko>=1.7,<2.0 in ./lib/python2.7/site-packages/paramiko-1.7.7.1-py2.7.egg (from fabric)
Downloading/unpacking pycrypto>=2.1 (from paramiko>=1.7,<2.0->fabric)
Running setup.py egg_info for package pycrypto
Installing collected packages: pycrypto
Running setup.py install for pycrypto
warning: GMP or MPIR library not found; Not building Crypto.PublicKey._fastmath.
building 'Crypto.Hash.MD2' extension
gcc-4.0 -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch ppc -arch x86_64 -std=c99 -O3 -fomit-frame-pointer -Isrc/ -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/MD2.c -o build/temp.macosx-10.5-fat3-2.7/src/MD2.o
unable to execute gcc-4.0: No such file or directory
error: command 'gcc-4.0' failed with exit status 1
Complete output from command /Users/emilepetrone/Sites/newsite/salesapp/bin/python -c "import setuptools;__file__='/Users/emilepetrone/Sites/newsite/salesapp/build/pycrypto/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /var/folders/hv/yjvyz6g96xd4c4nbg3hgtk9c0000gn/T/pip-R0wRzk-record/install-record.txt --install-headers /Users/emilepetrone/Sites/newsite/salesapp/bin/../include/site/python2.7:
running install
running build
running build_configure
running build_py
running build_ext
warning: GMP or MPIR library not found; Not building Crypto.PublicKey._fastmath.
building 'Crypto.Hash.MD2' extension
gcc-4.0 -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch ppc -arch x86_64 -std=c99 -O3 -fomit-frame-pointer -Isrc/ -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/MD2.c -o build/temp.macosx-10.5-fat3-2.7/src/MD2.o
unable to execute gcc-4.0: No such file or directory
error: command 'gcc-4.0' failed with exit status 1
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
OSX 10.7 也有同样的问题。我的修复:
我下载的 MySQL-python 版本名为 gcc-4.0
gcc 已经是 apple gcc 版本的符号链接。
PS 确保您还安装了 xcode 和命令行工具
Same issue with OSX 10.7. My fix:
the version of MySQL-python I downloaded called for gcc-4.0
gcc is already a symlink to the apple gcc build.
P.S. Make sure you have xcode and command line tools installed as well
奇怪的是,我还在 OS X 雪豹上,当我输入 gcc-4.0 时,我得到:
所以我猜实际的实现版本是 4.0.1 但可执行文件名称是 gcc-4.0
也许你应该尝试创建一个链接 gcc- 4.0 将指向您的可执行文件 (4.0.1)
strange, I'm still on the OS X snow leopard, when I type gcc-4.0 I get:
so I guess the actual implementation version is 4.0.1 but the executable name is gcc-4.0
maybe you should try creating a link gcc-4.0 that will point to your executable (4.0.1)
如果有帮助的话,我用符号链接解决了这个讨厌的问题,我认为它会对你有用。我写这篇文章时考虑的是我的 gcc 版本,即 4.2:
好了!
If it helps any, I solved this pesky issue with sym links, and I think it will work for you. I wrote this with my version of gcc in mind, which is 4.2:
There ya go!