当我尝试Pod install
时,CocoaPods会返回错误。以下是我在一些谷歌之后尝试的内容:
http://blog.cocoapods.org/Repairing-Our-Broken-Specs-Repository/
中所述,我已移除并重新下载了包含sudo rm -fr ~/.cocoapods/repos/master/
和Pod Setup
我正在使用Xcode 6.1.1和Yosemite 10.10.2。
$ pod setup --verbose
Setting up CocoaPods master repo
Creating shallow clone of spec repo `master` from `https://github.com/CocoaPods/Specs.git` (branch `master`)
$ /usr/local/bin/git clone 'https://github.com/CocoaPods/Specs.git' master --depth=1
Cloning into 'master'...
Checking out files: 100% (26795/26795), done.
$ /usr/local/bin/git checkout master
Already on 'master'
Your branch is up-to-date with 'origin/master'.
[!] There was an error reading '/Users/sythus/.cocoapods/repos/master/CocoaPods-version.yml'.
Please consult http://blog.cocoapods.org/Repairing-Our-Broken-Specs-Repository/ for more information.
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/sources_manager.rb:316:in `rescue in version_information'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/sources_manager.rb:313:in `version_information'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/sources_manager.rb:234:in `check_version_information'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/command/repo.rb:57:in `block in run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/user_interface.rb:49:in `section'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/command/repo.rb:49:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/command/setup.rb:84:in `add_master_repo'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/command/setup.rb:40:in `block in run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/user_interface.rb:49:in `section'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/command/setup.rb:32:in `run'
/Library/Ruby/Gems/2.0.0/gems/claide-0.7.0/lib/claide/command.rb:271:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/command.rb:45:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/bin/pod:43:in `<top (required)>'
/usr/bin/pod:23:in `load'
/usr/bin/pod:23:in `<main>'
感谢您的回答!
答案 0 :(得分:13)
我错过了CococPods的一个问题。似乎问题来自于心理2.0.8 Pod setup error. #2908
sudo gem uninstall psych
sudo gem install psych -v 2.0.5