iOS开发之$ pod setup时,CocoaPods报CocoaPods was not able to update the `master` repo.

最近在安装cocoapods, pod setup时,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`错误。

解决办法如下:
先删除全局的缓存:
$ sudo rm -fr ~/Library/Caches/CocoaPods/
$ sudo rm -fr ~/.cocoapods/repos/master/
把当前 Pods 目录清空:
$ sudo rm -fr Pods/
然后,重新安装cocoapods
执行命令 $sudo gem install -n /usr/local/bin cocoapods
再次
$ pod setup
慢慢等吧,看你网速了,最终出现
CocoaPods 1.0.0.beta.8 is available.
To update use: gem install cocoapods --pre
[!] This is a test version we'd love you to try.

For more information see http://blog.cocoapods.org
and the CHANGELOG for this version http://git.io/BaH8pQ.

Setup completed
至此问题解决完成。

你可能感兴趣的:(iOS,/,OC)