我执行了正常的pod update并收到了以下消息:
[!] There was an error reading '~/.cocoapods/repos/master/CocoaPods-version.yml'.
Please consult http://blog.cocoapods.org/Repairing-Our-Broken-Specs-Repository/ for more information.所以我遵循了http://blog.cocoapods.org/Repairing-Our-Broken-Specs-Repository/中的说明
$ sudo rm -fr ~/.cocoapods/repos/master
$ pod setup
Setting up CocoaPods master repo
[!] There was an error reading '~/.cocoapods/repos/master/CocoaPods-version.yml'.
Please consult http://blog.cocoapods.org/Repairing-Our-Broken-Specs-Repository/ for more information.同样的错误。所以我删除了cocapods,升级了ruby和gems,安装了cocoapods:
$ sudo rm -fr ~/.cocoapods
$ sudo gem uninstall cocoapods
Remove executables:
pod, sandbox-pod
in addition to the gem? [Yn] y
Removing pod
Removing sandbox-pod
Successfully uninstalled cocoapods-0.35.0
$ sudo gem update --system
Latest version currently installed. Aborting.
$ sudo gem update
Updating installed gems
Updating activesupport
Fetching: i18n-0.7.0.gem (100%)
.
.
.
$ sudo gem install cocoapods
Fetching: cocoapods-0.35.0.gem (100%)
Successfully installed cocoapods-0.35.0
Parsing documentation for cocoapods-0.35.0
Installing ri documentation for cocoapods-0.35.0
Done installing documentation for cocoapods after 4 seconds
1 gem installed
$ pod setup
Setting up CocoaPods master repo
[!] There was an error reading '~/.cocoapods/repos/master/CocoaPods-version.yml'.
Please consult http://blog.cocoapods.org/Repairing-Our-Broken-Specs-Repository/ for more information.为了好玩,我还运行了pod install。
同样的错误。还有人遇到这个问题吗?解决它?或者看到我做错了什么?这个iOs应用程序已经使用了一段时间了。我刚将pod 'ZSSRichTextEditor', '~> 0.5'添加到Podfile中,作为最近的更改。
更新:
这里是CocoaPods-version.yml文件:
---
min: 0.32.1
last: 0.35.0发布于 2014-12-21 02:22:50
好的,在github上找到了相同的问题线程。由csknns回答。
这是对我来说,重新安装心理治疗的方式:
$ sudo gem uninstall psych
Password:
Select gem to uninstall:
1. psych-2.0.5
2. psych-2.0.6
3. psych-2.0.8
4. All versions
> 4
Successfully uninstalled psych-2.0.5
Successfully uninstalled psych-2.0.6
Successfully uninstalled psych-2.0.8
$ 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 2 seconds
1 gem installed
$ pod setup
Setting up CocoaPods master repo
Already up-to-date.
Setup completed希望这对外面的人有帮助!
发布于 2015-11-01 01:27:09
这个bug似乎在较新版本的RubyGems中得到了修复。使用gem update --system进行更新可以使我在不破坏CocoaPods的情况下更新到最新版本的内核。
信贷:https://github.com/CocoaPods/CocoaPods/issues/3539#issuecomment-125106504
发布于 2019-11-27 18:58:59
最后对我有用的是cocoapods github上发布的这里解决方案
rm -rf ~/Library/Caches/CocoaPods ~/.cocoapods; gem update --system; gem update; gem cleanup; pod setuphttps://stackoverflow.com/questions/27583949
复制相似问题