转移到Mac OS Sierra之后,我遇到了安装cocoapods的问题。
每次运行sudo gem install cocoapods --pre
时,每个东西都安装得很好,但在尝试安装pod时,终端堆栈上设置CocoaPods主仓库。已经使用sudo gem update --system
更新了系统并仍然遇到了同样的问题,在线搜索以找到使用pod install --verbose Ss
的旧答案。我发现在这个答案中失败再次告诉我手动安装它
注意:我有最新版本的“命令行工具”。有任何建议或如何手动安装主仓库?
即使安装了空的pod(即没有任何pod名称),它也会提供
/Library/Ruby/Site/2.0.0/rubygems/dependency.rb:315:in `to_specs': Could not find 'cocoapods' (>= 0) among 66 total gem(s) (Gem::LoadError) Checked in 'GEM_PATH=/Users/my_name/.gem/ruby/2.0.0:/Library/Ruby/Gems/2.0.0:/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/gems/2.0.0', execute `gem env` for more information from /Library/Ruby/Site/2.0.0/rubygems/dependency.rb:324:in `to_spec' from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_gem.rb:64:in `gem' from /usr/local/bin/pod:22:in `'
答案 0 :(得分:8)
按照以下说明操作。它可能对你有帮助。
pod --version
sudo gem uninstall cocoapods
sudo gem install -n / usr / local / bin cocoapods