Can't install gem, "ruby installation is missing psych"

2,959 views
Skip to first unread message

Trung Hoang

unread,
Oct 22, 2012, 3:35:49 AM10/22/12
to rubyversi...@googlegroups.com
I am running Suse Enterprise Linux Server 11 SP2. Rvm installs without problems. Then when i try to install any gem i get the below error. Weird as on MacOSX and centos 6.3 I can not replicate this problem. 

Any ideas?

developer@test-server:~> gem install veewee
/home/developer/.rvm/rubies/ruby-1.9.3-p286/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.
ERROR:  Loading command: install (LoadError)
    cannot load such file -- zlib
ERROR:  While executing gem ... (NameError)
    uninitialized constant Gem::Commands::InstallCommand

developer@test-server:~> sudo zypper install libtool
root's password:
Loading repository data...
Reading installed packages...
'libtool' is already installed.
No update candidate for 'libtool-2.2.6-2.131.1.i586'. The highest available version is already installed.
Resolving package dependencies...

Nothing to do.

mpapis

unread,
Oct 22, 2012, 10:08:58 AM10/22/12
to rubyversi...@googlegroups.com
make sure to read `rvm requirements` and then reinstall ruby: `rvm reinstall 1.9.3`, finally make it default: `rvm use 1.9.3 --default`

Trung Hoang

unread,
Oct 22, 2012, 6:26:37 PM10/22/12
to rubyversi...@googlegroups.com
`rvm requirements` showed it requires bash v.4.1, on SLES SP2 it runs 3.2.51. I did not notice any errors in the rvm or ruby 1.9.3 install.

However i installed rvm and gems fine on my macosx running bash v.3.2.48.

Could it be because it can't find the yaml.so or something?

mpapis

unread,
Oct 22, 2012, 11:41:32 PM10/22/12
to rubyversi...@googlegroups.com
are you sure all libraries and their development versions pointed in `rvm requirements` are installed? can you check one by one?

Trung Hoang

unread,
Oct 24, 2012, 8:05:14 PM10/24/12
to rubyversi...@googlegroups.com
My bash is 3.2.51, i have curl, no git, i have patch.

vagrant@vagrant-sles-11-x86_64:~> bash --version
GNU bash, version 3.2.51(1)-release (x86_64-suse-linux-gnu)
Copyright (C) 2007 Free Software Foundation, Inc.

vagrant@vagrant-sles-11-x86_64:~> rvm requirements

Requirements for Linux ( SUSE Linux Enterprise Server 11 (x86_64)
VERSION = 11
PATCHLEVEL = 2 )

NOTE: 'ruby' represents Matz's Ruby Interpreter (MRI) (1.8.X, 1.9.X)
             This is the *original* / standard Ruby Language Interpreter
      'ree'  represents Ruby Enterprise Edition
      'rbx'  represents Rubinius

bash >= 4.1 required
curl is required
git is required (>= 1.7 for ruby-head)
patch is required (for 1.8 rubies and some ruby-head's).

To install rbx and/or Ruby 1.9 head (MRI) (eg. 1.9.2-head),
then you must install and use rvm 1.8.7 first.

Additional Dependencies:
# For Ruby / Ruby HEAD (MRI, Rubinius, & REE), install the following:
  ruby: sudo zypper install -y patterns-openSUSE-devel_basis gcc-c++ bzip2 readline-devel zlib-devel
                           libxml2-devel libxslt-devel libyaml-devel libopenssl-devel libffi45-devel
                           libtool bison

# For JRuby, install the following:
  jruby: sudo zypper install -y java-1_6_0-sun # Non-Oss repository required


Interestingly i ran this: 

vagrant@vagrant-sles-11-x86_64:~> ruby
require 'psych'
/home/vagrant/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': libyaml-0.so.2: cannot open shared object file: No such file or directory - /home/vagrant/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/x86_64-linux/psych.so (LoadError)
        from /home/vagrant/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/vagrant/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/psych.rb:1:in `<top (required)>'
        from /home/vagrant/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/vagrant/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from -:1:in `<main>'

Weird error as it does exist!!

vagrant@vagrant-sles-11-x86_64:~> ls -l /home/vagrant/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/x86_64-linux/psych.so
-rwxr-xr-x 1 vagrant users 40850 Oct 25 10:51 /home/vagrant/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/x86_64-linux/psych.so


What's going on?

Trung Hoang

unread,
Oct 24, 2012, 8:41:50 PM10/24/12
to rubyversi...@googlegroups.com
Solved!

$ zypper install -y gcc readline-devel zlib-devel libxml2-devel libxslt-devel libopenssl-devel libtool bison
(can't find libffi45-devel and libyaml-devel)

Then
$ rvm reinstall 1.9.3

Thanks Michal for your replies.

On another note, when you run $rvm requirements, under 'Additional Dependencies' where is the code which displays that? I'd like to make a change as it's openSUSE specific and not for SLES... It probably also should say that you require SLES-SDK...

David Deryl Downey

unread,
Oct 24, 2012, 8:49:48 PM10/24/12
to rubyversi...@googlegroups.com
Can you fork the site and create a PR for the addition? thank you
Reply all
Reply to author
Forward
0 new messages