gpt4 book ai didi

ios - 错误 : "Could not find ' cocoapods'"while installing a Pod

转载 作者:可可西里 更新时间:2023-11-01 04:08:41 25 4
gpt4 key购买 nike

我试图在我的项目中使用 pod install 来实现 SDK 但它抛出了这个错误:

/Library/Ruby/Site/2.0.0/rubygems/dependency.rb:318:in 'to_specs': Could not find 'cocoapods' (>= 0.a) among 35 total gem(s) (Gem::LoadError) Checked in 'GEM_PATH=/Users/admin/.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:327: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 `'

有谁知道是什么原因造成的以及如何解决?

最佳答案

首先使用 sudo 命令卸载 CocoaPods。

按照以下步骤:

  1. sudo gem uninstall cocoapods
  2. gem 安装 cocoapods
  3. pod 安装

当你再次安装时,不要使用 sudo 命令。您可以找到 sudo less installation从这里开始。

关于ios - 错误 : "Could not find ' cocoapods'"while installing a Pod,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34741507/

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