gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-02 00:45:57 36 4
gpt4 key购买 nike

执行此命令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

最佳答案

我已在终端中运行此命令

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

这对我有用

关于xcode - 使用 Xcode 5 和 Xcode 4.6.3 的 CocoaPods 安装问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18930860/

36 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com