It seems your ruby installation is missing psych (for YAML output). To eliminate this warning, please install libyaml and reinstall your ruby. #119

toamitkumar opened this Issue Jan 11, 2012 · 18 comments


None yet

Getting this issue on Suse 11 sp1.


sstephenson commented Jan 11, 2012

What version of Ruby are you trying to install? More info please.

I tried ruby 1.9.3, though installing 192 works... is the issue related to libyaml being installed inside /usr/local/ruby-1.9.3-p0 ?

So installing yaml inside /usr/local solves the problem
Looks like installing it inside /usr/local/ruby-1.9.3-p0 is the problem.
ruby is not able to find yaml while installing

is there a command line arg to pass install location ??

bbck commented Jan 21, 2012

I ran into this issue on Gentoo. I got around it by adding a configuration flag manually. I'm not sure why I have this issue only on this one box or why it wouldn't at least pick up the libyaml installed globally for the system ruby.

CONFIGURATION_OPTS="--with-opt-dir=/home/chris/.rbenv/versions/1.9.3-p0" ruby-build 1.9.3-p0 ~/.rbenv/versions/1.9.3-p0

could not figure out a solution, compiling from source for both yaml and ruby seems to resolve the issue.

tar xzvf yaml-0.1.4.tar.gz
pushd yaml-0.1.4
./configure --prefix=/usr/local
make && make install

tar xzvf ruby-1.9.3-p0.tar.gz
pushd ruby-1.9.3-p0
./configure --prefix=/usr/local --enable-shared --disable-install-doc --with-opt-dir=/usr/local/lib
make && make install

juhakaja commented Feb 4, 2012

I had something similar; curl gave an SSL certificate error - installation of 1.9.3 worked, but with issues with yaml. One quick and dirty an insecure way to fix it was to add an option -k after curl fetch command in ~/.rvm/scripts/fetch.

See more in

Also experiencing this issue on gentoo. The command @bbck mentioned worked for me with a minor correction. Note, use full paths in place of ~/.

CONFIGURE_OPTS="--with-opt-dir=~/.rbenv/versions/1.9.3-p0" ruby-build 1.9.3-p0 ~/.rbenv/versions/1.9.3-p0

sstephenson commented Apr 23, 2012

Would someone care to add a note about this to the wiki?

x2002g commented Jun 7, 2012

In my case, it's fixed by installing "libtool". Maybe you can find your clue in file "yaml/make.log" as install log mentions.

meisert commented Jul 3, 2012

I had the same problem in that the yaml installed in ruby 1.9.3 directory was referenced first, so the yaml in /usr/local/ didn't get referenced. This caused the above error.
The solution was to completely remove ruby 1.9.3 directories from the various locations in /usr/local/lib/ruby and then re-install (build & install) ruby again from source code. that got rid of the yaml I had created the first time I installed yaml I believe.
then I was able to upgrade my rubygems

Thank you meisert...

I have no idea what I was doing, but after massive googling ultimately it came down to reinstalling ruby clean once installing libyaml.

// bye bye to you files
rm -rf /usr/local/lib/ruby/*
// cd ruby dir
make install

bingo - on centos 6.3 VirtualMachine

sunild commented Jan 28, 2013

In my case, libyaml was already installed (according to yum). Instead of compiling libyaml from source, I installed the package "libyaml-devel" and then recompiled ruby w/out any special options. Fixed.

Having this same problem with Ruby 2.1.0-dev on CentOS 5.x there a workaround? Tried compiling libyaml and then reinstalling with rbenv install 2.1.0-dev but still getting error:

It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your ruby.
/home/???/.rbenv/versions/2.1.0-dev/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:45:in `require': cannot open shared object file: No such file or directory - /home/???/.rbenv/versions/2.1.0-dev/lib/ruby/2.1.0/x86_64-linux/ (LoadError)

ryansch commented May 13, 2013

This continues to be an issue. I just hit my head on this on a fresh install of 1.9.3-p392 on amazon linux release 2013.03.

Edit: Turns out I was having some 32 bit vs 64 bit issues.

We just had the problem on a freshly installed SLES 11 SP3.
Our solution is to install 2.1.x as usual

rbenv install 2.1.1

And then set


in the environment.

dawbs referenced this issue in rbenv/rbenv Jun 11, 2014



jehos commented Apr 8, 2017

in my case on Ubuntu Zesty Zapus 17.04

jehos@MacBuntu:/usr/lib/ruby/2.3.0/psych⟫ dpkg -S /usr/lib/ruby/2.3.0/psych
libruby2.3:amd64: /usr/lib/ruby/2.3.0/psych

Let's satisfy dependency

jehos@MacBuntu:/usr/lib/ruby/2.3.0/psych⟫ sudo apt-get build-dep libruby2.3
Reading package lists... Done
Picking 'ruby2.3' as source package instead of 'libruby2.3'
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  chrpath libfontconfig1-dev libfreetype6-dev libgdbm-dev libncurses5-dev libncursesw5-dev libpng-dev libssl1.0-dev libxext-dev libxft-dev
  libxrender-dev libxss-dev systemtap-sdt-dev tcl8.6-dev tk8.6-dev x11proto-render-dev x11proto-scrnsaver-dev x11proto-xext-dev
0 upgraded, 18 newly installed, 0 to remove and 0 not upgraded.
Need to get 8,422 kB of archives.
After this operation, 24.3 MB of additional disk space will be used.
Do you want to continue? [Y/n] y

... blahblah ...

and then,

jehos@MacBuntu:~⟫ rbenv install 2.3.4
Downloading ruby-2.3.4.tar.bz2...
Installing ruby-2.3.4...
Installed ruby-2.3.4 to /home/jehos/.rbenv/versions/2.3.4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment