YAML safe loading is not available. Please upgrade psych to a version that supports safe loading (>=

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

最近看到群里很多人问这个问题,自己电脑上一直没有出现,刚好最近需要给一台新电脑装环境,莫名出现了这个问题,在此记录一下解决方案

$ rvm list known
$ rvm install 2.4.1 # 这里可以安装你需要的版本  但是需要安装2.0以上的
$ rvm use 2.4.1 --default

安装好了以后就可以去安装你的应用或其他,但是我发现,我之前电脑上安装了cocoapods,这个时候更新了rvm以后,cocoapods就不正常了,
出现下面的错误

/Library/Ruby/Site/2.0.0/rubygems/dependency.rb:308:in `to_specs': Could not find 'cocoapods' (>= 0) among 76 total gem(s) (Gem::MissingSpecError)
Checked in 'GEM_PATH=/Users/alex/.rvm/gems/ruby-2.4.1:/Users/alex/.rvm/gems/ruby-2.4.1@global', execute `gem env` for more information
    from /Library/Ruby/Site/2.0.0/rubygems/dependency.rb:320:in `to_spec'
    from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_gem.rb:65:in `gem'
    from /usr/local/bin/pod:22:in `
'

这个时候我们重新安装一下cocoapods就OK了

你可能感兴趣的:(iOS)