美文网首页
关于cocopods更新出错问题的解决

关于cocopods更新出错问题的解决

作者: butterflyer | 来源:发表于2016-12-19 10:20 被阅读60次

    在我们大天朝,使用网络都是被监控的,我们安装cocopods的时候之前都会从网上搜索很多解决办法,但是发现新的https://ruby.taobao.org/已经不再维护了。所以我们在安装的时候会一直遇到证书问题。同时我们公司的网络同样存在动态修改用户host的功能(这个好像有),所以被迫使用新的网络,然后将错误提示和新的请求办法贴出来。

    执行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)

    其实只要是使用gem的都会又ssl证书问题。

    下面说下用的新路径

    gem sources --remove https://ruby.taobao.org/

    gem sources -a https://gems.ruby-china.org/

    gem sources -l

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

    然后就会执行成功了,不过此刻会卡住,其实是在下载文件,你可以用下面的方法查看下载的文件大小。

    cd ~/.cocoapods/

    du -sh *

    到此就可以说是解决了这个问题了。

    相关文章

      网友评论

          本文标题:关于cocopods更新出错问题的解决

          本文链接:https://www.haomeiwen.com/subject/oottvttx.html