【问题标题】:Error installing localtunnel安装本地隧道时出错
【发布时间】:2013-02-03 20:35:34
【问题描述】:

我运行 sudo gem install localtunnel 并得到以下输出。现在我使用自制软件安装 rbenv 来安装 ruby​​,当我运行 brew doctor 时,它说 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

【问题讨论】:

    标签: xcode gem homebrew rbenv localtunnel


    【解决方案1】:

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

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

    如果没有帮助,请致电

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

    明确设置 xcrun 的路径。

    【讨论】:

    • 我已经安装了命令行工具并运行该命令输出 xcode-select: Error: Path "/Applications/Xcode.app" is not a directory.
    • @AndersKitson:那么你在哪里安装了 Xcode 应用程序?
    • 嗯,我用应用商店安装了它,所以我假设默认的应用程序文件夹。
    • @AndersKitson:您可以右键单击 Xcode 图标并选择“选项->在 Finder 中显示”以查看安装位置。
    • 哦很奇怪它安装在 /Volumes/SANDBOX/Applications 现在这是我创建的分区并安装了我的操作系统的不同设置。那么我将如何安装 xcode,因为应用商店认为它已经安装但它在不同的分区上?
    【解决方案2】:

    我的 Ruby 版本已过期,我必须运行 rbenv install 1.9.3-p0 并将其设置为全局。

    【讨论】:

      猜你喜欢
      • 2021-05-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-09-07
      • 1970-01-01
      • 1970-01-01
      • 2019-11-28
      • 1970-01-01
      相关资源
      最近更新 更多