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