cocoaPods 最新升级方式

最近要把cocoapods升级到1.1.版本的,按照之前的升级方式,

gem install cocoapods

结果出现了

ERROR:  While executing gem ... (Gem::DependencyError)
    Unable to resolve dependencies: cocoapods requires cocoapods-core (= 1.1.1), cocoapods-downloader (< 2.0, >= 1.1.2), cocoapods-trunk (< 2.0, >= 1.1.1), xcodeproj (< 2.0, >= 1.3.3)

想了一下,应该要加上路径的,继续

gem install -n /usr/local/bin cocoapods

结果还是同一个错误

ERROR:  While executing gem ... (Gem::DependencyError)
    Unable to resolve dependencies: cocoapods requires cocoapods-core (= 1.1.1), cocoapods-downloader (< 2.0, >= 1.1.2), cocoapods-trunk (< 2.0, >= 1.1.1), xcodeproj (< 2.0, >= 1.3.3)

再想了一下,应该先更新system,这次要加上sudo,sudo是获得系统权限

sudo gem update --system

好了,更新成功,提示好长一串东西,这里就不写出来了。
再一次去升级cocoapods,记住,还是要加上sudo。

sudo gem install -n /usr/local/bin cocoapods

出现这些但不限于这些,即为升级成功

Fetching: nanaimo-0.2.3.gem (100%)
Successfully installed nanaimo-0.2.3
Fetching: claide-1.0.1.gem (100%)
Successfully installed claide-1.0.1
Fetching: CFPropertyList-2.3.4.gem (100%)
Successfully installed CFPropertyList-2.3.4
Fetching: xcodeproj-1.4.1.gem (100%)
Successfully installed xcodeproj-1.4.1
Fetching: molinillo-0.5.4.gem (100%)

查看了一下版本

pod --version

是1.1.1


1.png

OK!

你可能感兴趣的:(cocoaPods 最新升级方式)