'sudo gem install cocoapods'在El Capitan 10.11.4上不起作用,错误:在任何存储库中找不到有效的gem'cocoapods'(> = 0) [英] 'sudo gem install cocoapods' doesn't work on El Capitan 10.11.4 , ERROR: Could not find a valid gem 'cocoapods' (>= 0) in any repository

查看:55
本文介绍了'sudo gem install cocoapods'在El Capitan 10.11.4上不起作用,错误:在任何存储库中找不到有效的gem'cocoapods'(> = 0)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从优胜美地升级到El Capitan似乎已经淘汰了已经安装的CocoaPods。当我Pod安装Alamofire / SwiftyJson时,它显示找不到Pod命令 ,并且根据stackoverflow解决方案,我卸载了cocoapods并尝试使用命令重新安装

Upgrading from Yosemite to El Capitan seem to have wiped out the already installed CocoaPods. When I pod install Alamofire/SwiftyJson, it says 'Pod command not found', and as per the stackoverflow solutions I uninstalled cocoapods and trying to reinstall it with the commands

 - sudo gem uninstall cocoapods
 - sudo gem install cocoapods

我收到错误:


找不到有效的宝石'cocoapods '(> = 0)在任何存储库中

"Could not find a valid gem 'cocoapods' (>= 0) in any repository"

请仔细阅读专家在问题
下提到的所有解决方案 https://github.com/CocoaPods/CocoaPods/issues/3736

Did go through ALL the solutions mentioned by the Gurus under the issue https://github.com/CocoaPods/CocoaPods/issues/3736

主要尝试了这种方法,这似乎对很多人都有效。

mainly tried this which seem to have worked for many. still doesn't work for me.

sudo gem install -n /usr/local/bin cocoapods

尝试根据上述链接和SO链接中提供的解决方案修改权限等

tried modifying the permissions etc as per the solutions provided in the above link and the SO link

http://stackoverflow.com/questions/30812777/cannot-install-cocoa-pods-after-uninstalling-results-in-error?rq=1

什么都不起作用,一切都会导致相同的错误
找不到有效的宝石'cocoapods' (> = 0)在任何存储库中

Nothing works, EVERYTHING leads to the same error "Could not find a valid gem 'cocoapods' (>= 0) in any repository"

我也提出了一个问题,

https://github.com/CocoaPods/CocoaPods/issues/5232


推荐答案

我遇到了同样的问题,并使用以下命令修复了该问题

I faced the same problem and it was fixed by using the following command

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

这篇关于'sudo gem install cocoapods'在El Capitan 10.11.4上不起作用,错误:在任何存储库中找不到有效的gem'cocoapods'(> = 0)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆