CocoaPods安裝出現SSL verification error

weixin_34146805發表於2017-04-11

在安裝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環境
首先要安裝 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

相關文章