zoukankan      html  css  js  c++  java
  • CocoaPod 使用之后知后觉

    一、安装

    1. 安装需要用到ruby(macOS系统自带ruby,但比较老旧,建议更新)

    $ sudo gem update --system
    

     之后输入用户系统密码,等待安装。

    2. 如果源出现问题,会报错,需要更换源。

    $ sudo gem update --system
    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.org expired at 2018-12-05T03:16:02Z
    ERROR:  While executing gem ... (Gem::RemoteFetcher::FetchError)
        SSL_connect returned=1 errno=0 state=error: certificate verify failed (certificate has expired) (https://ruby.taobao.org/specs.4.8.gz)
    

    3. 查看源

    $ gem sources -l
    *** CURRENT SOURCES ***
    
    https://ruby.taobao.org
    https://gems.ruby-china.com/
    

    4. 如果需要,可以增加源或删除源

    $ gem sources --add https://gems.ruby-china.com/ --remove https://rubygems.org/
    

    5.【请确保源只有 gems.ruby-china.com 】【2018.8.28 https://gems.ruby-china.org域名更新为https://gems.ruby-china.com】

    然后就可以使用

    $ sudo gem update --system

    更新 ruby 了

    6. 安装 pod

    $ sudo gem install cocoapods
    $ pod --version
    $ pod setup
    

    7. 如果【6】报错,使用 $ sudo gem install -n /usr/local/bin cocoapods

    二、参考

    https://www.jianshu.com/p/1bb0ad42cb2e

    时常一个人发呆,看到宁静的天空。
  • 相关阅读:
    2019春季助教学期总结
    第二次实验设计报告
    第十二周作业
    第十一周作业
    第十周作业
    第九周作业
    第八周作业
    万恶的第七周作业
    第六周作业
    堆积如山的第五周作业
  • 原文地址:https://www.cnblogs.com/pinweyshg/p/10364593.html
Copyright © 2011-2022 走看看