【问题标题】:CocoaPods installation issue using Xcode 5 and Xcode 4.6.3使用 Xcode 5 和 Xcode 4.6.3 的 CocoaPods 安装问题
【发布时间】:2013-09-26 16:09:54
【问题描述】:

在这个命令sudo gem install cocoapods之后我得到了下面的错误。

我认为它连接到了 Xcode 5 的错误路径。当我安装它时,我将它保存在桌面上,但他们将它移到了应用程序文件夹中。我使用 Xcode 4.6.3 和 Xcode 5。如何更改路径来解决此问题。两个 XCode 上都安装了命令行工具。

Building native extensions.  This could take a while...
ERROR:  Error installing cocoapods:
    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 '/Users/alex/Desktop/Xcode 5.app/Contents/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  
clang: error: no such file or directory: 'generator.o'
make: *** [generator.bundle] Error 1


Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/json-1.8.0 for inspection.
Results logged to /Library/Ruby/Gems/1.8/gems/json-1.8.0/ext/json/ext/generator/gem_make.out

【问题讨论】:

    标签: xcode xcode5 cocoapods xcode4.6.3


    【解决方案1】:

    我已经在终端运行了这个命令

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

    对我有用

    【讨论】:

      猜你喜欢
      • 2014-10-23
      • 1970-01-01
      • 1970-01-01
      • 2014-01-31
      • 2016-01-17
      • 2014-01-14
      • 1970-01-01
      • 2018-09-09
      • 2018-01-09
      相关资源
      最近更新 更多