YAML|YAML safe loading is not available
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 storeERROR: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
- 如果没有安装那就先安装
curl -sSL https://get.rvm.io | bash -s stable
- 看看目前能更新的最高版本是哪个?
rvm list known
- 查找类似 [ruby-]2.4[.1] 的地方, 查看最高支持的版本.
rvm install ruby 2.4// 发文章最新版为2.4
gem install xxxx
推荐阅读
- SpringBoot中YAML语法及几个注意点说明
- RCTBridge|RCTBridge required dispatch_sync to load RCTDevLoadingView. This may lead to deadlocks
- LoadingCache简单实例,使用google缓存机制缓存每天数据库第一条数据并保存
- jvm Safe Point
- loading|水流波动效果的进度条
- java 缓存架构剖析--本地缓存(LoadingCache)
- java缓存之 本地缓存(LoadingCache)
- 在线JSON转YAML工具
- 清理缓存加载loading,如何正确显示代码实现
- Flutter|Flutter 让你的Dialog脱胎换骨吧!(Attach,Dialog,Loading,Toast)