3

I'm trying to install RVM on a CentOS host and it fails with this error:

/usr/local/rvm/rubies/ruby-1.9.3-p194/bin/ruby: error while loading shared libraries: libruby.so.1.9: cannot open shared object file: No such file or directory
Libraries missing for ruby-1.9.3-p194: libruby.so.1.9. Refer to your system manual for installing libraries
Mounting remote ruby failed, trying to compile.

After some Googling it seems I need to manually install the libyaml package, to which the host says:

No package libyaml available.

Any ideas?

t56k
  • 6,769
  • 9
  • 52
  • 115
  • See also [this question and answer](http://stackoverflow.com/questions/12882190/unable-to-resolve-ruby-error-missing-psych). – Thilo Apr 17 '13 at 09:23

3 Answers3

6

Try installing this using RVM :

rvm pkg install libyaml

It works on my CENTOS 6.3 VPS.

Nikana Reklawyks
  • 3,233
  • 3
  • 33
  • 49
duardbr
  • 180
  • 9
  • 1
    This installs `libyaml`, but not `libyaml-devel`. For that, it still returns "No package libyaml-devel available" for the defautlt CentOS repos. – Thilo Apr 17 '13 at 09:21
3

with the latest rvm (run rvm get head), libyaml is automatically fetched when installing Ruby (well, at least on 1.9.3).

You'll see if it has been installed by inspecting /usr/local as that's where rvm puts it...

phildobbin
  • 814
  • 8
  • 9
2

I've managed to solve it by piecing together others' attempts. I followed these instructions, and despite getting an error that read:

Error running 'autoreconf -is --force', please read /usr/local/rvm/log/ruby-1.9.2-p320/yaml/autoreconf.log

I managed to install both the rake gem and the rails gem.

om-nom-nom
  • 62,329
  • 13
  • 183
  • 228
t56k
  • 6,769
  • 9
  • 52
  • 115