使用 Xcode 5 和 Xcode 4.6.3 的 CocoaPods 安装问题



在此命令sudo gem install cocoapods之后,我在下面出现错误。

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

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

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

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

它对我有用

最新更新