[英]ERROR: Could not find a valid gem 'cocoapods' (>= 0) in any repository
i am trying to run a AWS Cognito service project in which i have added the AWS SDK for iOS but after adding it and trying to run it it shows me the below shown error in the image我正在尝试运行一个 AWS Cognito 服务项目,我在其中添加了适用于 iOS 的 AWS SDK,但是在添加它并尝试运行它之后,它显示了如下图所示的错误
ERROR: Could not find a valid gem 'cocoapods' (>= 0) in any repository错误:无法在任何存储库中找到有效的 gem 'cocoapods' (>= 0)
when i crawl it on internet and found some cocoapods install instructions so after trying that i got some other error like below当我在互联网上抓取它并发现一些 cocoapods 安装说明时,所以在尝试之后我遇到了一些其他错误,如下所示
aparajita:Objective-C Aparajita$ sudo gem install cocoapods
Password:
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin14/rbconfig.rb:213: warning: Insecure world writable dir /usr/local in PATH, mode 040777
ERROR: Could not find a valid gem 'cocoapods' (>= 0) in any repository
aparajita:Objective-C Aparajita$ gem install cocoapods
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin14/rbconfig.rb:213: warning: Insecure world writable dir /usr/local in PATH, mode 040777
ERROR: Could not find a valid gem 'cocoapods' (>= 0) in any repository
aparajita:Objective-C Aparajita$ gem source -a http://rubygems.org/
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin14/rbconfig.rb:213: warning: Insecure world writable dir /usr/local in PATH, mode 040777
https://rubygems.org is recommended for security over http://rubygems.org/
Do you want to add this insecure source? [yn] y
Error fetching http://rubygems.org/:
no such name (http://rubygems.org/specs.4.8.gz)
aparajita:Objective-C Aparajita$ gem source -a rubygems.org
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin14/rbconfig.rb:213: warning: Insecure world writable dir /usr/local in PATH, mode 040777
rubygems.org is not a URI
aparajita:Objective-C Aparajita$ gem source -r rubygems.org
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin14/rbconfig.rb:213: warning: Insecure world writable dir /usr/local in PATH, mode 040777
source rubygems.org not present in cache
i have tried it all but still above log i got from the console.我已经尝试了所有但仍然高于我从控制台获得的日志。 if any one have any solution on this please let me know, thanks
如果有人对此有任何解决方案,请告诉我,谢谢
OK, I just had this problem.好的,我刚遇到这个问题。 If anyone seems to have this problem DO NOT change directories.
如果有人似乎有这个问题,请不要更改目录。
Load up terminal and straight away add the line -加载终端并立即添加行 -
sudo gem install cocoapods
Worked for me.为我工作。
I struggled with same issue 1 week, finally this works for me我在同一个问题上苦苦挣扎了 1 周,最后这对我有用
Disable IPv6 and try again with sudo gem install cocoapods --source http://rubygems.org禁用 IPv6 并使用sudo gem install cocoapods --source http://rubygems.org再试一次
Issues seems with network网络似乎有问题
Few more details give on rugby gems forum - https://help.rubygems.org/discussions/problems/31074-timeout-error关于橄榄球宝石论坛的更多细节 - https://help.rubygems.org/discussions/problems/31074-timeout-error
This command worked for me这个命令对我有用
sudo gem install cocoapods --source http://rubygems.org
In my case I used VPN, because http://rubygems.org was unavailable, as soon as I switched the VPN on sudo gem install cocoapods worked在我的例子中,我使用了 VPN,因为http://rubygems.org不可用,当我在 sudo gem install cocoapods 上切换 VPN 时,它就起作用了
Make sure you have Xcode installed in your Mac.确保您的 Mac 中安装了 Xcode。 After opening for the first time you need to accept the Terms & Condition and may need to install some components.
首次打开后,您需要接受条款和条件,并且可能需要安装一些组件。 Once it is setup and working, then install Pod:
安装并运行后,安装 Pod:
sudo gem install cocoapods
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.