2013-02-19 46 views
0

我運行sudo gem install localtunnel,我得到以下輸出。現在我用自制軟件安裝rbenv來安裝紅寶石,當我運行brew醫生時,它說xcode已經過時了,但是當我打開xcode並轉向它時,它是最新版本,這裏是我爲sudo gem安裝localtunnel的錯誤輸出安裝localtunnel時出錯

ERROR: Error installing localtunnel: 
    ERROR: Failed to build gem native extension. 

     /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb 
creating Makefile 

make 
xcrun cc -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin12.0 -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin12.0 -I. -DJSON_GENERATOR -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -arch i386 -arch x86_64 -g -O3 -pipe -fno-common -DENABLE_DTRACE -fno-common -pipe -fno-common -c generator.c 
xcrun: Error: could not stat active Xcode path '/Developer'. (No such file or directory) 
cc -arch i386 -arch x86_64 -pipe -bundle -undefined dynamic_lookup -o generator.bundle generator.o -L. -L/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib -L. -arch i386 -arch x86_64  -lruby -lpthread -ldl -lobjc 
i686-apple-darwin11-llvm-gcc-4.2: generator.o: No such file or directory 
i686-apple-darwin11-llvm-gcc-4.2: generator.o: No such file or directory 
lipo: can't figure out the architecture type of: /var/tmp//ccfplODR.out 
make: *** [generator.bundle] Error 1 

回答

1

Xcode 4不再安裝在/ Developer中,但xcrun似乎期待它在那裏。

我會先安裝「命令行工具」(Xcode首選項 - >下載 - >組件)。

如果沒有幫助,請撥打

sudo xcode-select -switch /Applications/Xcode.app 

明確設置爲xcrun路徑。

+0

我已經安裝了命令行工具並運行該命令輸出xcode-select:錯誤:路徑「/Applications/Xcode.app」不是目錄。 – 2013-02-19 18:04:43

+0

@AndersKitson:那麼你在哪裏安裝了Xcode應用程序? – 2013-02-19 18:08:52

+0

以及我安裝它與應用商店,所以我會承擔默認的應用程序文件夾。 – 2013-02-19 18:16:22

0

我的Ruby版本過期了,我不得不運行rbenv install 1.9.3-p0並將其設置爲全局。