简体   繁体   English

错误:无法在任何存储库中找到有效的 gem 'cocoapods' (>= 0)

[英]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如果有人对此有任何解决方案,请告诉我,谢谢

I am facing the same problem and I resolved it by issuing using the following command我面临同样的问题,我通过使用以下命令发出解决了它

sudo gem install cocoapods --source http://rubygems.org

在此处输入图像描述

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.

相关问题 CocoaPods 找不到 pod“Firebase/CoreOnly”的兼容版本 - CocoaPods could not find compatible versions for pod "Firebase/CoreOnly" CocoaPods 找不到 pod“Firebase/Core”的兼容版本 | cloud_firestore,Flutter - CocoaPods could not find compatible versions for pod "Firebase/Core” | cloud_firestore, Flutter 无法将代码推送到 CodeCommit 存储库 - Could not push code to the CodeCommit repository Android Studio 构建错误:Gradle - 找不到平台('com.google.firebase:firebase-bom:30.3.1') - Android Studio build error: Gradle - Could not find platform('com.google.firebase:firebase-bom:30.3.1') 在 GKE 中安装 istio 时出错 = 服务器找不到请求的资源(发布 `gatewaies.networking.istio.io`) - Error install istio in GKE = the server could not find the requested resource (post `gatewaies.networking.istio.io`) 谷歌云部署错误:找不到满足要求的版本 - google cloud deploy ERROR: Could not find a version that satisfies the requirement GitLab - 找不到“单声道”主机 - GitLab - Could not find 'mono' host Firestore 错误“无法反序列化对象” - Firestore Error "Could not deserialize object" 创建新的 git 项目:无效 HTTP Git 存储库 - Create new git project: Is not valid HTTP Git repository ssh:无法解析主机名 git:名称或服务未知致命:无法从远程存储库读取 - ssh: Could not resolve hostname git: Name or service not known fatal: Could not read from remote repository
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM