请安装 libyaml 并重新安装您的 ruby
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/15738883/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Please install libyaml and reinstall your ruby
提问by Rpj
libyaml warning doesn't go away, even if you install libyaml
即使您安装了 libyaml,libyaml 警告也不会消失
gem install bundler
/home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/yaml.rb:56:in `<top (required)>':
It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your ruby.
Fetching: bundler-1.3.4.gem (100%)
Successfully installed bundler-1.3.4
回答by shayonj
First remove any previous docs of yaml by
首先删除任何以前的 yaml 文档
cd .rvm/src
sudo rm -rf yaml*
Then you can do rest of the install by -
然后您可以通过以下方式完成其余的安装 -
rvm pkg install libyaml
rvm pkg install libyaml
P.S You will need to reinstall ruby after this.
PS 在此之后,您将需要重新安装 ruby。
UPDATE:更新:如果
rvm pkgrvm pkg似乎已被弃用。您可以自行编译源代码。您所要做的就是从以下网址下载最新版本的 libyaml http://pyyaml.org/download/libyaml/http://pyyaml.org/download/libyaml/tar zxf yaml-0.1.4.tar.gz
cd yaml-0.1.4
./configure
make
make install
UPDATE2:UPDATE2:顺便说一句,您仍然可以使用 rvm pkg 和/或在重新安装 ruby 时确保通过以下方式启用自动库
\curl -L https://get.rvm.io | bash -s stable --rails --autolibs=enable\curl -L https://get.rvm.io | bash -s stable --rails --autolibs=enable回答by Mike
If using homebrew, a temporary fix that worked for me was to run:
如果使用自制软件,对我有用的临时修复是运行:
brew unlink libyaml && brew link libyaml
plus you may also need to run:
此外,您可能还需要运行:
brew unlink openssl && brew link --force openssl
See this issue thread for more details: https://github.com/wayneeseguin/rvm/issues/2689
有关更多详细信息,请参阅此问题线程:https: //github.com/wayneeseguin/rvm/issues/2689
回答by lfender6445
A friend of mine had a similar problem on his mac.
我的一个朋友在他的 mac 上遇到了类似的问题。
brew install libyaml
brew install libyaml
ended up working for us and we were able to avoid a reinstall of ruby.
最终为我们工作,我们能够避免重新安装 ruby。

