解决办法如下:
先删除全局的缓存:
$ sudo rm -fr ~/Library/Caches/CocoaPods/
$ sudo rm -fr ~/.cocoapods/repos/master/
把当前 Pods 目录清空:
$ sudo rm -fr Pods/
然后,重新安装cocoapods
$sudo gem install cocoapods 温馨提示:苹果系统升级 OS X EL Capitan 后改为 $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
至此问题解决完成。
想试用beta版的自己按上面给的提示安装
煎熬我很久的问题,终于在今天早上搞定了!顺便分享给大家~