Nik
Nik

Reputation: 293

Trouble installing ruby1.9.2

I am trying to install ruby1.9.2 using rvm on my Linux system (Mint-Linux distro), but I am unable to due to some errors which I cannot debug. This is the error I am getting when I run the install command.

$ rvm install 1.9.2
Installing Ruby from source to: /home/nnn/.rvm/rubies/ruby-1.9.2-p290, this may take a while depending on your cpu(s)...

ruby-1.9.2-p290 - #fetching 
ruby-1.9.2-p290 - #extracted to /home/nnn/.rvm/src/ruby-1.9.2-p290 (already extracted)
Fetching yaml-0.1.4.tar.gz to /home/nnn/.rvm/archives
Extracting yaml-0.1.4.tar.gz to /home/nnn/.rvm/src
Configuring yaml in /home/nnn/.rvm/src/yaml-0.1.4.
Compiling yaml in /home/nnn/.rvm/src/yaml-0.1.4.
Installing yaml to /home/nnn/.rvm/usr

ruby-1.9.2-p290 - #configuring 
ERROR: Error running ' ./configure --prefix=/home/nnn/.rvm/rubies/ruby-1.9.2-p290 --enable-shared --disable-install-doc --with-libyaml-dir=/home/nnn/.rvm/usr ', 
please read /home/nnn/.rvm/log/ruby-1.9.2-p290/configure.log
ERROR: There has been an error while running configure. Halting the installation.

The configure.log file has the following errors.

./configure --prefix=/home/nnn/.rvm/rubies/ruby-1.9.2-p290 --enable-shared --disable-install-doc --with-libyaml-dir=/home/nnn/.rvm/usr 
configure: WARNING: unrecognized options: --with-libyaml-dir
configure: error: could not determine MAJOR number from version.h

Can you please help me out ?

Thanks

Upvotes: 2

Views: 675

Answers (1)

emboss
emboss

Reputation: 39620

If you run

./configure --help

you will see that there is indeed no option 'with-libyaml-dir', it is not supported by Ruby's main configure script.

These "with-xxx-dir" parameters are often used during the compilation of extensions, where you create a Makefile by running

ruby extconf.rb --with-libimportantforextension-dir=...

In your case a workaround solution would be to install libyaml using apt-get:

sudo apt-get install libyaml

This way RVM will probably recognize that it is already installed and will not attempt to download and install it to a custom location, so you shouldn't receive the error you currently get anymore.

Upvotes: 2

Related Questions