美文网首页
关于Unable to download data from h

关于Unable to download data from h

作者: JustusWoolworth | 来源:发表于2019-03-06 16:53 被阅读0次

今天更新cocoapods版本的时候,安装会报出一个奇怪的错误

sudo gem install cocoapods

ERROR: Could not find a valid gem 'cocoapods' (>= 0), here is why:
Unable to download data from https://gems.ruby-china.org/ - bad response Not Found 404 (https://gems.ruby-china.org/specs.4.8.gz)

通过查找原因发现:sources 里面镜像链接 https://gems.ruby-china.org 被弃用

Screen Shot 2019-03-06 at 4.49.04 PM.png

需要重新换一下源:

gem sources --remove https://gems.ruby-china.org/
gem sources --add https://gems.ruby-china.com/
gem sources --list                               
*** CURRENT SOURCES ***

https://gems.ruby-china.com/

然后重新安装一下即可

sudo gem install cocoapods

如果有人遇到类似的问题,希望对你有所帮助。

相关文章

网友评论

      本文标题:关于Unable to download data from h

      本文链接:https://www.haomeiwen.com/subject/aerxpqtx.html