美文网首页iOSiOS开发笔记
YAML safe loading is not availab

YAML safe loading is not availab

作者: sasky2008 | 来源:发表于2018-02-22 20:00 被阅读159次
  YAML safe loading is not available. Please upgrade psych to a version that supports safe loading (>= 2.0).

  ERROR:  SSL verification error at depth 1: unable to get local issuer certificate (20)

  ERROR:  You must add /O=Digital Signature Trust Co./CN=DST Root CA X3 to your local trusted store

  ERROR:  While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory.

此问题出现场景毕竟其实毕竟多. 基本上执行gem install xxx 都可能发生.

网上搜索大部分是

  gem install cocoapods
  gem install xxxx

然后修复方法大部分都是

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

之前偶尔换系统之类的按照cocoapods我也使用过此方法, 但是总想一探究竟.

解决方法

更新 ruby

  1. 如果没有安装那就先安装

     curl -sSL https://get.rvm.io | bash -s stable
    
  2. 看看目前能更新的最高版本是哪个?

     rvm list known  
    
  3. 查找类似 [ruby-]2.4[.1] 的地方, 查看最高支持的版本.

     rvm install ruby 2.4  // 发文章最新版为2.4
    

静静等待几分钟, 以后任意使用

    gem install xxxx

相关文章

网友评论

    本文标题:YAML safe loading is not availab

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