簡體   English   中英

使用RVM的Mac OS X Lion Xcode問題

[英]Mac OS X Lion Xcode problems using RVM

我有Xcode 4.1預覽5工作正常,但決定通過App商店升級到最終的xcode 4.1。 我首先卸載了Xcode ...

sudo /Developer/Library/uninstall-devtools –mode=all

然后通過應用商店安裝Xcode並重新啟動。

我也完全刪除了RVM,但是......現在每當我嘗試安裝Ruby版本時它都會失敗。 在錯誤文件中我得到這個:

[2011-07-27 18:29:25]  ./configure --prefix="/Users/holden/.rvm/usr"  
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... config/install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... no
checking for gcc... /usr/bin/gcc-4.2
checking whether the C compiler works... no
configure: error: in `/Users/holden/.rvm/src/yaml-0.1.4':
configure: error: C compiler cannot create executables
See `config.log' for more details

/ usr / bin目錄中沒有gcc-4.2或任何其他gcc。

Xcode有什么用?

顯然,甚至在從Appstore下載並“安裝”XCode之后,盡管下載了很長的過程,但似乎安裝它並且“Installed”這個詞最終會顯示在商店旁邊。 您仍然必須在應用程序文件夾中再次手動安裝它才能工作。

奇。

剛剛買了一台Mac,在安裝Xcode后看到/ usr / bin沒有gcc,我必須做的就是:輸入Xcode首選項轉到下載選項卡並安裝命令行工具。 設置我的開發者帳戶並下載工具后,我打開終端並輸入

rvm install 1.9.3 --with-gcc=clang

一切都編譯和工作。

注意 - 運行“安裝Xcode”后,我仍然只在/ usr / bin中有“gcc”,而不是gcc-4.2。 但仍然工作正常,/ usr / bin / gcc是/usr/bin/llvm-gcc-4.2的符號鏈接

蓋伊上面的回答似乎解決了在RVM中編譯完全安裝XCode 4.2的問題,並刪除了我從https://github.com/kennethreitz/osx-gcc-installer安裝GCC。 對於需要同時安裝RVM和XCode 4.2的用戶來說,這是首選。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM