2016-11-27 120 views
2

我在項目中使用可可豆莢時遇到了麻煩,所以我決定卸載並重新安裝。現在它破裂了。我完全從我的系統中刪除所有可可豆莢並重新安裝。 (包括移除,可可豆莢目錄)安裝豆莢(cocoapods)時出錯

gem install cocoapods 
pod setup 

似乎已經奏效

Setting up CocoaPods master repo 

CocoaPods 1.2.0.beta.1 is available. 
To update use: `gem install cocoapods --pre` 
[!] This is a test version we'd love you to try. 

For more information, see https://blog.cocoapods.org and the CHANGELOG for this version at https://github.com/CocoaPods/CocoaPods/releases/tag/1.2.0.beta.1 

Setup completed 

現在,經過我莢安裝:

pod install --verbose 
    Preparing 
Unknown option: -C 
usage: git [--version] [--help] [-c name=value] 
      [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path] 
      [-p|--paginate|--no-pager] [--no-replace-objects] [--bare] 
      [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>] 
      <command> [<args>] 
Unknown option: -C 
usage: git [--version] [--help] [-c name=value] 
      [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path] 
      [-p|--paginate|--no-pager] [--no-replace-objects] [--bare] 
      [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>] 
      <command> [<args>] 

Setting up CocoaPods master repo 
    $ /usr/local/bin/git remote set-url origin 
    https://github.com/CocoaPods/Specs.git 
    $ /usr/local/bin/git checkout master 
    Already on 'master' 
Unknown option: -C 
usage: git [--version] [--help] [-c name=value] 
      [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path] 
      [-p|--paginate|--no-pager] [--no-replace-objects] [--bare] 
      [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>] 
      <command> [<args>] 
[!] Unable to add a source with url `https://github.com/CocoaPods/Specs.git` named `master-1`. 
(The `master` repo is not a git repo.) 
You can try adding it manually in `~/.cocoapods/repos` or via `pod repo add`. 

/Users/Nic/.rvm/gems/ruby-2.2.3/gems/cocoapods-1.1.1/lib/cocoapods/sources_manager.rb:35:in `rescue in find_or_create_source_with_url' 
/Users/Nic/.rvm/gems/ruby-2.2.3/gems/cocoapods-1.1.1/lib/cocoapods/sources_manager.rb:38:in `find_or_create_source_with_url' 
/Users/Nic/.rvm/gems/ruby-2.2.3/gems/cocoapods-1.1.1/lib/cocoapods/installer/analyzer.rb:814:in `block in sources' 
/Users/Nic/.rvm/gems/ruby-2.2.3/gems/cocoapods-1.1.1/lib/cocoapods/installer/analyzer.rb:813:in `map' 
/Users/Nic/.rvm/gems/ruby-2.2.3/gems/cocoapods-1.1.1/lib/cocoapods/installer/analyzer.rb:813:in `sources' 
/Users/Nic/.rvm/gems/ruby-2.2.3/gems/cocoapods-1.1.1/lib/cocoapods/installer.rb:143:in `resolve_dependencies' 
/Users/Nic/.rvm/gems/ruby-2.2.3/gems/cocoapods-1.1.1/lib/cocoapods/installer.rb:110:in `install!' 
/Users/Nic/.rvm/gems/ruby-2.2.3/gems/cocoapods-1.1.1/lib/cocoapods/command/install.rb:37:in `run' 
/Users/Nic/.rvm/gems/ruby-2.2.3/gems/claide-1.0.1/lib/claide/command.rb:334:in `run' 
/Users/Nic/.rvm/gems/ruby-2.2.3/gems/cocoapods-1.1.1/lib/cocoapods/command.rb:50:in `run' 
/Users/Nic/.rvm/gems/ruby-2.2.3/gems/cocoapods-1.1.1/bin/pod:55:in `<top (required)>' 
/Users/Nic/.rvm/gems/ruby-2.2.3/bin/pod:23:in `load' 
/Users/Nic/.rvm/gems/ruby-2.2.3/bin/pod:23:in `<main>' 
/Users/Nic/.rvm/gems/ruby-2.2.3/bin/ruby_executable_hooks:15:in `eval' 
/Users/Nic/.rvm/gems/ruby-2.2.3/bin/ruby_executable_hooks:15:in `<main>' 

其實我有可可豆莢工作正常,我卸載之前,但現在每次都發生這種情況! 我莢文件:

target 'Project' do 

    pod 'RestKit', '~> 0.24.0' 

end 

回答

1

通過更新混帳固定。如果沒有正確更新,還必須將其與brew進行鏈接

相關問題