Please install libyaml and reinstall your ruby
Asked Answered
I

3

23

libyaml warning doesn't go away, even if you install 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
Inorganic answered 1/4, 2013 at 6:44 Comment(0)
C
24

First remove any previous docs of yaml by

cd .rvm/src
sudo rm -rf yaml*

Then you can do rest of the install by -

rvm pkg install libyaml

P.S You will need to reinstall ruby after this.


UPDATE: If rvm pkg seems to be deprecated. You can compile a source on your own. All you gotta do is download the latest version of libyaml from http://pyyaml.org/download/libyaml/
tar zxf yaml-0.1.4.tar.gz
cd yaml-0.1.4
./configure
make
make install


UPDATE2: BTW, you could still use rvm pkg and/or when reinstalling ruby make sure to enbale autolibs by \curl -L https://get.rvm.io | bash -s stable --rails --autolibs=enable
Cullen answered 1/4, 2013 at 6:54 Comment(1)
For that didn't work. I even reinstalled rvm, turnend on autolibs etc. Finally manually downloaded and installed libyaml (like above) and installed the ruby with the libyaml option (see https://mcmap.net/q/246901/-unable-to-resolve-ruby-error-missing-psych).Lillian
C
25

A friend of mine had a similar problem on his mac.

brew install libyaml

ended up working for us and we were able to avoid a reinstall of ruby.

Cervelat answered 15/8, 2014 at 16:3 Comment(4)
This worked for 2 issues I was experiencing. Thanks.Samothrace
This worked for me without needing to reinstall Ruby. In my case, brew install libyaml did nothing since it was already installed, but brew reinstall libyaml did the trick.Molest
You should add a soultion for every platform not only MACEncephalo
@Encephalo No he doesn't, he doesn't have to provide solutions for all platforms because they are sharing their experience with a Mac and he is possibly limited to that. It's up to the reader to adapt the information to their own platform and seek help from others in the community if needed. Other users would improve this collection of answers here to satisfy your requirement.Bollen
C
24

First remove any previous docs of yaml by

cd .rvm/src
sudo rm -rf yaml*

Then you can do rest of the install by -

rvm pkg install libyaml

P.S You will need to reinstall ruby after this.


UPDATE: If rvm pkg seems to be deprecated. You can compile a source on your own. All you gotta do is download the latest version of libyaml from http://pyyaml.org/download/libyaml/
tar zxf yaml-0.1.4.tar.gz
cd yaml-0.1.4
./configure
make
make install


UPDATE2: BTW, you could still use rvm pkg and/or when reinstalling ruby make sure to enbale autolibs by \curl -L https://get.rvm.io | bash -s stable --rails --autolibs=enable
Cullen answered 1/4, 2013 at 6:54 Comment(1)
For that didn't work. I even reinstalled rvm, turnend on autolibs etc. Finally manually downloaded and installed libyaml (like above) and installed the ruby with the libyaml option (see https://mcmap.net/q/246901/-unable-to-resolve-ruby-error-missing-psych).Lillian
Q
15

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

Quietus answered 23/7, 2014 at 5:58 Comment(1)
After trying everything under the sun, this is what solve my issue.Syllable

© 2022 - 2024 — McMap. All rights reserved.