场景 :突然在用pod uodate 的时候报错。
justinjingdeMacBook-Pro:RACTestDemo justinjing$ pod update Update all pods Analyzing dependencies [!] There was an error reading '/Users/justinjing/.cocoapods/repos/master-1/CocoaPods-version.yml'. Please consult http://blog.cocoapods.org/Repairing-Our-Broken-Specs-Repository/ for more information.
有好久没有用pod了,今天突然要更新下,不幸的报错了。
Google了下,有好多种解决办法,
然后发现在github的issue列表里有人也遇到了同样的问题。
尝试解决了下,步骤如下:
justinjingdeMacBook-Pro:RACTestDemo justinjing$ sudo gem uninstall psych Password: Select gem to uninstall: 1. psych-2.0.6 2. psych-2.0.12 3. All versions > 3 Successfully uninstalled psych-2.0.6 Successfully uninstalled psych-2.0.12 justinjingdeMacBook-Pro:RACTestDemo justinjing$ sudo gem install psych -v 2.0.12 Fetching: psych-2.0.12.gem (100%) Building native extensions. This could take a while... Successfully installed psych-2.0.12 Parsing documentation for psych-2.0.12 Installing ri documentation for psych-2.0.12 Done installing documentation for psych after 1 seconds 1 gem installed(安装完成) justinjingdeMacBook-Pro:RACTestDemo justinjing$ justinjingdeMacBook-Pro:RACTestDemo justinjing$ pod update(尝试更新) Update all pods Analyzing dependencies [!] There was an error reading '/Users/justinjing/.cocoapods/repos/master-1/CocoaPods-version.yml'. Please consult http://blog.cocoapods.org/Repairing-Our-Broken-Specs-Repository/ for more information.(不幸的是错误再次发生) justinjingdeMacBook-Pro:RACTestDemo justinjing$ sudo gem uninstall psych(不放弃再来一次) Successfully uninstalled psych-2.0.12 justinjingdeMacBook-Pro:RACTestDemo justinjing$ sudo gem install psych -v 2.0.0(修改了版本再来一次) Fetching: psych-2.0.0.gem (100%) Building native extensions. This could take a while... Successfully installed psych-2.0.0 Parsing documentation for psych-2.0.0 Installing ri documentation for psych-2.0.0 Done installing documentation for psych after 1 seconds 1 gem installed(安装成功) justinjingdeMacBook-Pro:RACTestDemo justinjing$ pod update Update all pods Analyzing dependencies CocoaPods 0.36.1 is available. To update use: `gem install cocoapods`(到这里,成功啦)。
sudo gem uninstall psych sudo gem install psych -v 2.0.0