美文网首页
cocoapods更新某个版本

cocoapods更新某个版本

作者: WeeverLu | 来源:发表于2019-05-30 10:08 被阅读0次
    • 看看cocoapod版本号

      $pod --version
      
      Ignoring ffi-1.9.23 because its extensions are not built.  Try: gem pristine ffi --version 1.9.23
      1.6.1
      
    • 1.6.1是我的版本号,改成你目前的,卸载老版本

      $sudo gem uninstall cocoapods -v 1.6.1
      Password:需要输入密码
      Successfully uninstalled cocoapods-1.6.1
      
      $sudo gem uninstall cocoapods-core -v 1.6.1
      Successfully uninstalled cocoapods-core-1.6.1
      
    • 安装1.6.0版本

      $sudo gem install cocoapods -v 1.6.0
      
    • 如果报错

      ERROR:  While executing gem ... (Gem::FilePermissionError)
          You don't have write permissions for the /usr/bin directory.
      
    • 使用如下

      $sudo gem install cocoapods -v 1.6.0 -n /usr/local/bin
      Fetching: cocoapods-core-1.6.0.gem (100%)
      Successfully installed cocoapods-core-1.6.0
      Fetching: cocoapods-1.6.0.gem (100%)
      Successfully installed cocoapods-1.6.0
      Parsing documentation for cocoapods-core-1.6.0
      Installing ri documentation for cocoapods-core-1.6.0
      Parsing documentation for cocoapods-1.6.0
      Installing ri documentation for cocoapods-1.6.0
      Done installing documentation for cocoapods-core, cocoapods after 6 seconds
      2 gems installed
      

    • 卸载全部cocoapods

      sudo gem uninstall cocoapods
      
    • 安装

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

    相关文章

      网友评论

          本文标题:cocoapods更新某个版本

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