Cocoapods pod update执行失败报错CocoaPods was not able to update the `master` repo.2019的解决


很久没动pod,最近更新发现:

CocoaPods报CocoaPods was not able to update the `master` repo. If this is an unexpected issue and persists you can inspect it running `pod repo update --verbose`错误。

 

使用命令pod repo update --verbose依然 不行,报同样的错,也检查了gem、pod版本,都没问题

不过偶然发现可能是淘宝镜像的问题:https://ruby.taobao.org,出现过以下报错:

Error fetching https://ruby.taobao.org:
bad response Not Found 404 (https://gems.ruby-china.org/specs.4.8.gz)

 

后来折腾许久,终于解决了,思路就是替换镜像。

1、查看当前镜像

gem sources -l 

2、由于我这边是淘宝的,就直接移除了

gem source -a https://ruby.taobao.org 

3、替换

gem sources --add https://gems.ruby-china.com

 

通过以上步骤,在执行我的pod update就可以了

仅供参考~


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM