我在带有M2 CPU的Mac上使用rbenv。我已经安装了ruby 2.7.2,还想安装ruby 3.2.2。当运行rbenv install 3.2.2时,我得到以下错误:
yaml.rb:3: warning: It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your ruby.
The Ruby yaml extension was not compiled.
ERROR: Ruby install aborted due to missing extensions
解决方案在错误消息中。你可能只需要安装libyaml
试题:
brew install libyaml
我在Ubuntu 22.04中遇到了完全相同的问题。为我修复它的是
gem uninstall psych
gem uninstall openssl
和重试