在没有sudo的情况下安装cocoapods时会丢失什么权限?

时间:2015-09-22 23:11:16

标签: ios ruby install cocoapods

我想安装CocoaPods,但我没有管理员帐户,这意味着我无法使用sudo。我可以在没有sudo的情况下安装CocoaPods,如果我可以放弃哪些权限?

更新

我尝试了gem install cocoapods --user-install,我得到了这个输出:

/usr/local/Cellar/ruby/2.2.2/lib/ruby/2.2.0/yaml.rb:4:in `<top (required)>':
It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your ruby.
/usr/local/Cellar/ruby/2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': dlopen(/usr/local/lib/ruby/gems/2.2.0/extensions/x86_64-darwin-14/2.2.0/psych-2.0.13/psych.bundle, 9): Library not loaded: /usr/local/lib/libruby.2.2.0.dylib (LoadError)
  Referenced from: /usr/local/lib/ruby/gems/2.2.0/extensions/x86_64-darwin-14/2.2.0/psych-2.0.13/psych.bundle
  Reason: image not found - /usr/local/lib/ruby/gems/2.2.0/extensions/x86_64-darwin-14/2.2.0/psych-2.0.13/psych.bundle
    from /usr/local/Cellar/ruby/2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /usr/local/lib/ruby/gems/2.2.0/gems/psych-2.0.13/lib/psych.rb:1:in `<top (required)>'
    from /usr/local/Cellar/ruby/2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /usr/local/Cellar/ruby/2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /usr/local/Cellar/ruby/2.2.2/lib/ruby/2.2.0/yaml.rb:5:in `<top (required)>'
    from /usr/local/Cellar/ruby/2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /usr/local/Cellar/ruby/2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /usr/local/Cellar/ruby/2.2.2/lib/ruby/2.2.0/rubygems.rb:624:in `load_yaml'
    from /usr/local/Cellar/ruby/2.2.2/lib/ruby/2.2.0/rubygems/config_file.rb:328:in `load_file'
    from /usr/local/Cellar/ruby/2.2.2/lib/ruby/2.2.0/rubygems/config_file.rb:197:in `initialize'
    from /usr/local/Cellar/ruby/2.2.2/lib/ruby/2.2.0/rubygems/gem_runner.rb:74:in `new'
    from /usr/local/Cellar/ruby/2.2.2/lib/ruby/2.2.0/rubygems/gem_runner.rb:74:in `do_configuration'
    from /usr/local/Cellar/ruby/2.2.2/lib/ruby/2.2.0/rubygems/gem_runner.rb:39:in `run'
    from /usr/local/bin/gem:21:in `<main>'

我调查了另一个安装RVM的解决方案,但是我在安装它时遇到了麻烦。 (也许是因为我不是管理员?)

1 个答案:

答案 0 :(得分:1)