Cocopods异常解决

2016-11-19 12:16:29来源:oschina作者:阿元人点击

cocopod 异常


1.MacX-Zou:RelatedChat zoujie$ pod install


[!] Unable to load a specification for the plugin `/Library/Ruby/Gems/2.0.0/gems/cocoapods-deintegrate-1.0.1`


Updating local specs repositories


[!] The `master` repo requires CocoaPods 1.0.0 - (currently using 0.39.0)


Update CocoaPods, or checkout the appropriate tag in the repo.


1.1MacX-Zou:- zoujie$ pod update


Update all pods


[!] Unable to load a specification for the plugin `/Library/Ruby/Gems/2.0.0/gems/cocoapods-deintegrate-1.0.1`


Updating local specs repositories


[!] The `master` repo requires CocoaPods 1.0.0 - (currently using 0.39.0)


Update CocoaPods, or checkout the appropriate tag in the repo.

2.MacX-Zou:RelatedChat zoujie$ gem update cocoapods --pre


Updating installed gems


Updating cocoapods


Fetching: cocoapods-1.1.1.gem (100%)


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


You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory.


3.MacX-Zou:RelatedChat zoujie$ sudo gem update --system


Password:


Updating rubygems-update


ERROR: While executing gem ... (Errno::EPERM)


Operation not permitted - /usr/bin/update_rubygems

查看gem版本:


4.MacX-Zou:RelatedChat zoujie$ gem -v


2.4.8

5.MacX-Zou:RelatedChat zoujie$ sudo gem install -n /usr/local/bin xcodeproj


Successfully installed xcodeproj-1.4.1


Parsing documentation for xcodeproj-1.4.1


Installing ri documentation for xcodeproj-1.4.1


1 gem installed

ruby版本:


MacX-Zou:- zoujie$ ruby -v


ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin15]

查看gem源


MacX-Zou:umscashier zoujie$ gem sources -l


*** CURRENT SOURCES ***

/2014th7cj/d/file/p/20161119/iseqbnecoy3.org


更换gem源


MacX-Zou:- zoujie$ gem sources --remove /2014th7cj/d/file/p/20161119/iseqbnecoy3.org


/2014th7cj/d/file/p/20161119/iseqbnecoy3.org removed from sources


MacX-Zou:- zoujie$ gem source -a /2014th7cj/d/file/p/20161119/m1rsjmk1yby.org


/2014th7cj/d/file/p/20161119/m1rsjmk1yby.org added to sources


MacX-Zou:- zoujie$ gem source -l


*** CURRENT SOURCES ***

/2014th7cj/d/file/p/20161119/m1rsjmk1yby.org

cocopod升级到指定的1.1.1版本 解决问题


a、在终端输入:sudo gem uninstall cocoapods输出下面


Select gem to uninstall:


1. cocoapods-1.1.0.rc.2


2. cocoapods-1.2.0.beta.1


3. All versions


>‘在此处输入要删除的版本,如:“2” ’会输出下面


Successfully uninstalled cocoapods-1.1.1


b、在终端输入:sudo gem install cocoapods -v 1.1.1


输出:Fetching: cocoapods-1.1.1.gem (100%)


ERROR: While executing gem ... (Errno::EPERM)


Operation not permitted - /usr/bin/pod


c、上面的方法不行,换另一种输入:sudo gem install -n /usr/local/bin cocoapods -v 1.1.1


输出:Successfully installed cocoapods-1.1.1


Parsing documentation for cocoapods-1.1.1


Installing ri documentation for cocoapods-1.1.1


1 gem installed


d、输入pod --version查看一下版本号


输出:1.1.1


最新文章

123

最新摄影

微信扫一扫

第七城市微信公众平台