问题描述
我一直在寻找这个问题的答案,但找不到,所以就在这里.
I've been looking for an answer to this issue but I couldn't find it, so here it is.
我正在尝试将带有 setup.py 文件的 Uniconvertor 安装到 MacOS X 中Lion (Python 2.7.2) 使用:
I'm trying to install Uniconvertor with a setup.py file into a MacOS X Lion (Python 2.7.2) using:
python setup.py install
然后我得到以下错误代码:
Then I get the following error code:
running install
running build
running build_py
running build_ext
building 'uniconvertor.app.modules.streamfilter' extension
gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -isysroot /Developer/SDKs/MacOSX10.6.sdk -g -O2 -DNDEBUG -g -O3 -arch i386 -arch x86_64 -DMAJOR_VERSION=1 -DMINOR_VERSION=1 -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/modules/filter/streamfilter.c -o build/temp.macosx-10.6-intel-2.7/src/modules/filter/streamfilter.o
unable to execute gcc-4.2: No such file or directory
error: command 'gcc-4.2' failed with exit status 1
我在 Developer/usr/bin 文件夹中查找了gcc-4.2"文件,但它不在那里,但是有一个llvm-gcc.4.2"文件让我觉得我应该将编译器从 'gcc-4.2' 到 'llvm-gcc.4.2' 一个.
I looked for the 'gcc-4.2' file in the Developer/usr/bin folder and it wasn't there, but there's a 'llvm-gcc.4.2' file that makes me think I should change the compiler from 'gcc-4.2' to the 'llvm-gcc.4.2' one.
我对 Mac 有点陌生,我不知道如何解决它.
I'm kind of new to Mac and I don't know how else to fix it.
谢谢.
我尝试使用:
cd /Developer/usr/bin
ln -s llvm-gcc-4.2 gcc-4.2
而且我取得了更大的进步,但又出现了一个新错误:
And I get a little more progress, but then a new error:
running install_lib
creating /Library/Python/2.7/site-packages/uniconvertor
error: could not create '/Library/Python/2.7/site-packages/uniconvertor': Permission denied
此权限被拒绝"的原因可能是什么?
What could be the cause of this 'Permission denied'?
我正在使用管理员帐户运行它,它不会要求输入密码或任何东西.
I'm running it into an Admin account and it doesn't ask for a password or anything.
再次感谢.
推荐答案
尝试以下操作:
- 安装最新的 Xcode.
- 从 Xcode 的 Preferences 菜单中,安装命令行工具(下载/组件选项卡).
这篇关于gcc-4.2 失败,退出状态为 1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!