安装cocopods遇见的问题

1、现在pod使用的镜像是:gem source -a https://gems.ruby-china.org(官方镜像  替代原来的镜像)

2、安装pod可参考此篇文章:安装cocopods;

3、安装出现错误:

Library/Ruby/Site/2.0.0/rubygems/dependency.rb:318:in `to_specs': Could not find 'cocoapods' (>= 0) among 33 total gem(s) (Gem::LoadError)Checked in 'GEM_PATH=/Users/xianlong/.gem/ruby/2.0.0:/Library/Ruby/Gems/2.0.0:/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/gems/2.0.0', execute `gem env` for more informationfrom /Library/Ruby/Site/2.0.0/rubygems/dependency.rb:327:in `to_spec'from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_gem.rb:64:in `gem'from /usr/local/bin/pod:22:in `'

参考此篇文章:cocopo报错;

转载自:www.cnblogs.com/hanxianlong

4、在解决第三个问题的时候,可能会报错:

While executing gem ... (Gem::FilePermissionError)

You don't have write permissions for the /var/lib/gems/2.1.0 directory.

这个是权限的问题,解决办法如下:

使用此命令    sudo gem install

5、更多错误码请参考

www.aichengxu.com/other/2467176.htm

你可能感兴趣的:(安装cocopods遇见的问题)