我一直在尋找這個問題的答案,但我找不到它,所以它就是這樣。使用gcc-4.2失敗,退出狀態爲1
我試圖用一個setup.py文件轉換成的MacOS X Lion的安裝Uniconvertor(Python的2.7.2):
python setup.py install
然後我收到以下錯誤代碼:
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'。
我是一個新的Mac,我不知道如何解決它。
謝謝。
編輯:
我嘗試使用:
cd /Developer/usr/bin
ln -s llvm-gcc-4.2 gcc-4.2
而且我得到多一點的進步,但隨後一個新的錯誤:
running install_lib
creating /Library/Python/2.7/site-packages/uniconvertor
error: could not create '/Library/Python/2.7/site-packages/uniconvertor': Permission denied
可能是什麼的這個「事業沒有權限'?
我正在運行它到一個管理員帳戶,它並沒有要求輸入密碼或任何東西。
再次感謝您。
從Xcode 4.2開始,Xcode不再包含gcc-4.2。通常,llvm-gcc-4.2或clang是一個合適的替代品,但您可能想與項目的維護人員聯繫,詢問爲什麼構建系統顯式請求gcc-4.2而不是使用默認系統編譯器。 – servn
看到這個問題的答案:http://stackoverflow.com/questions/10238458/cant-install-orange-error-command-clang-failed-with-exit-status-1 希望它有幫助! –