安装localtunnel时出错

时间:2013-02-19 08:17:40

标签: xcode gem homebrew rbenv localtunnel

我运行sudo gem install localtunnel,我得到以下输出。现在我用自制软件来安装rbenv来安装ruby,当我运行brew医生时它说xcode已经过时但是当我打开xcode并转到它是最新版本时,这里是我的错误输出为sudo gem install 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

2 个答案:

答案 0 :(得分:1)

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

我会首先安装“命令行工具”(Xcode首选项 - >下载 - >组件)。

如果没有帮助,请致电

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

显式设置xcrun的路径。

答案 1 :(得分:0)

我的Ruby版本已经过时了,我必须运行rbenv install 1.9.3-p0而不是将它设置为全局。