更新cocoapods遇到的问题

rvm版本过低

rvm get head    可以将rvm更新为最新版本

ruby版本过低

rvm list known   查看目前可用的所有ruby版本

rvm install 2.6.1  更新你想要的版本

cocoapods版本过低

现在淘宝源会显示证书过期了,所以可以选择将源改为 https://gems.ruby-china.com/

gem sources  查看当前源    

gem sources --remove (源地址)  移除源

gem sources -a (源地址)  添加源

gem install cocoapods 更新cocoapods

下面是我终端的输出



zhanglinadeMacBook-Pro:~ zhanglina$ gem sources

*** CURRENT SOURCES ***

zhanglinadeMacBook-Pro:~ zhanglina$ gem sources -a https://ruby.taobao.org/

ERROR:  SSL verification error at depth 0: certificate has expired (10)

ERROR:  Certificate /C=CN/ST=ZheJiang/L=HangZhou/O=Alibaba (China) Technology Co., Ltd./CN=*.taobao.orgexpired at 2018-12-05T03:16:02Z

Error fetching https://ruby.taobao.org/:

SSL_connect returned=1 errno=0 state=error: certificate verify failed (certificate has expired) (https://ruby.taobao.org/specs.4.8.gz)



我的想更改为的淘宝的源,提示证书有问题,把源改成 ruby-china源  更新完再查看一下 gem sources -l



zhanglinadeMacBook-Pro:~ zhanglina$ gem source -a https://gems.ruby-china.com/

https://gems.ruby-china.com/added to sources

zhanglinadeMacBook-Pro:~ zhanglina$ gem install cocoapods

Fetching i18n-0.9.5.gem

Fetching tzinfo-1.2.5.gem

Fetching activesupport-4.2.11.gem

Fetching nap-1.1.0.gem

Fetching fuzzy_match-2.0.4.gem

。。。。



你可能感兴趣的:(更新cocoapods遇到的问题)