您的位置:首页 > 编程语言 > Ruby

安装CocoaPods错误需要Ruby2.2版本以上

2017-04-27 16:48 615 查看
安装Cocoapods时出现以下错误 sudo gem install cocoapods

ERROR: SSL verification error at depth 1: unable to get local issuer certificate (20)

ERROR: You must add /C=IL/O=StartCom Ltd./OU=Secure Digital Certificate Signing/CN=StartCom Certification Authority to your local trusted store

ERROR: SSL verification error at depth 2: self signed certificate in certificate chain (19)

ERROR: Root certificate is not trusted (/C=US/O=GeoTrust Inc./CN=GeoTrust Global CA)

出现这个问题的原因主要是Ruby环境需要2.2版本以上,所以要更新Ruby环境。

更新Ruby环境

0.首先要安装Homebrew终端输入这条命令即可/usr/bin/ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”

1.安装rvm$ curl -L get.rvm.io | bash -s stable

2.装载rvm$ source ~/.rvm/scripts/rvm

3.安装2.3.0版本ruby$ rvm install 2.3.0

4.将2.3.0设为默认$ rvm use 2.3.0 –default

$ source ~/.bashrc

$ source ~/.bash_profile


测试是否安装正常

$ rvm -v
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  CocoaPod iOS Ruby 读书