wayneeseguin/rvm — pull request #3175 by mpapis (2014-12-05 21:53:15+00:00)
Title: Unable to install MRI Rubies on RHEL 6 (missing libyaml-devel)

We've been successfully using rvm on an un-changed RHEL 6 image, even up until a couple of days ago. Now, provisioning a new instance of it, installations fail with this:

Searching for binary rubies, this might take some time.
No binary rubies available for: redhat/6/x86_64/ruby-2.1.2.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for redhat.

Skipping installation of 'libffi-devel', in case you depend on FFI reinstall your ruby after following this instructions:
https://gist.github.com/rderoldan1/5920539

Installing requirements for redhat.
Updating system.
Installing required packages: libyaml-devel..
Error running 'requirements_centos_libs_install libyaml-devel',
showing last 15 lines of /usr/local/rvm/log/1417646673_ruby-2.1.2/package_install_libyaml-devel.log
++ __rvm_try_sudo yum install -y libyaml-devel
++ typeset -a command_to_run
++ typeset sudo_path sbin_path missing_paths
++ command_to_run=("$@")
++ (( UID == 0 ))
++ yum install -y libyaml-devel
Loaded plugins: product-id, refresh-packagekit, rhnplugin, security,
: subscription-manager
No package libyaml-devel available.
Error: Nothing to do
++ return 1
++ return 1
Requirements installation failed with status: 1.

Looking at the EPEL repos, it looks like the `libyaml-devel` package is gone. Finding a couple stale repos that probably haven't synced yet, it's still out there, but any current one it's missing. So either they removed it or someone messed up and the mistake got propagated. I can't find mention of it anywhere.

I saw in #2998 that RHEL 7 is also missing this library, so I extended the fix from 4538416 to apply to RHEL 6 as well, and the libyaml will install, along with the desired Ruby (2.1.2 in my case), but a RubyGems install step of some kind fails saying `psych.so` can't find `libyaml.so`, I'm guessing I have something missing in my library path?

Error running 'env GEM_HOME=/usr/local/rvm/gems/ruby-2.1.2@global GEM_PATH= /usr/local/rvm/rubies/ruby-2.1.2/bin/ruby -d /usr/local/rvm/src/rubygems-2.4.5/setup.rb --no-document',
showing last 15 lines of /usr/local/rvm/log/1417648601_ruby-2.1.2/rubygems.install.log
/usr/local/rvm/src/rubygems-2.4.5/lib/rubygems/core_ext/kernel_require.rb:54:in `require': libyaml-0.so.2: cannot open shared object file: No such file or directory - /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/x86_64-linux/psych.so (LoadError)
from /usr/local/rvm/src/rubygems-2.4.5/lib/rubygems/core_ext/kernel_require.rb:54:in `require'
from /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/psych.rb:1:in `'
from /usr/local/rvm/src/rubygems-2.4.5/lib/rubygems/core_ext/kernel_require.rb:54:in `require'
from /usr/local/rvm/src/rubygems-2.4.5/lib/rubygems/core_ext/kernel_require.rb:54:in `require'
from /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/yaml.rb:5:in `'
from /usr/local/rvm/src/rubygems-2.4.5/lib/rubygems/core_ext/kernel_require.rb:54:in `require'
from /usr/local/rvm/src/rubygems-2.4.5/lib/rubygems/core_ext/kernel_require.rb:54:in `require'
from /usr/local/rvm/src/rubygems-2.4.5/lib/rubygems.rb:624:in `load_yaml'
from /usr/local/rvm/src/rubygems-2.4.5/lib/rubygems/config_file.rb:328:in `load_file'
from /usr/local/rvm/src/rubygems-2.4.5/lib/rubygems/config_file.rb:197:in `initialize'
from /usr/local/rvm/src/rubygems-2.4.5/lib/rubygems/gem_runner.rb:74:in `new'
from /usr/local/rvm/src/rubygems-2.4.5/lib/rubygems/gem_runner.rb:74:in `do_configuration'
from /usr/local/rvm/src/rubygems-2.4.5/lib/rubygems/gem_runner.rb:39:in `run'
from setup.rb:45:in `

'

Any advice? Is this an upstream thing?

Thanks!