cocoapods安装问题-ERROR: While executing gem ... (Gem::DependencyError)

原因可能是因为gem版本过老

如果直接输入
sudo gem install cocoapods
或者
sudo gem install -n /usr/local/bin cocoapods

可能或出现如下错误
ERROR:  While executing gem ... (Gem::DependencyError)
Unable to resolve dependencies: cocoapods requires cocoapods-core (= 0.33.1), claide(~> 0.6.1), cocoapods-downloader(~> 0.6.1), cocoapods-plugins(~> 0.2.0), cocoapods-try(~> 0.3.0), cocoapods-trunk(~> 0.1.1), nap(~> 0.7)


2.1 查看gem版本
//终端执行
$ gem --version


2.2 升级gem版本
//终端执行
$ sudo gem update --system


3.安装CocoaPods

你可能感兴趣的:(cocoapods)