rvm install ree complaining about readline on Ubuntu

1.3k views Asked by At

I'm trying to install ree-1.8.7 on Ubuntu 11.10, but I get the following:

$ rvm install ree-1.8.7

$ ...
$ ERROR: Error running './installer -a $HOME/.rvm/rubies/ree-1.8.7-2011.03  --dont-install-useful-gems -c --with-readline-dir=$HOME/.rvm/usr', please read $HOME/.rvm/log/ree-1.8.7-2011.03/install.log
$ ERROR: There has been an error while trying to run the ree installer. Halting installation.

If I check the install.log file as suggested, it says that:

  • GNU Readline development headers... not found ... Please run apt-get install libreadline5-dev as root

That didn't work because the package is no longer available, so I finally found out about using libreadline from a rvm package. So I install it and run the install again:

$ rvm pkg install readline
$ rvm install ree-1.8.7 -C --with-readline-dir=$rvm_path/usr

I still get the same error even if I run rvm remove ree beforehand.

I'm stuck, what can I do?

UPDATE: I'm still stuck, but I found something that might be useful for others with a similar issue even though it didn't work for me. From the RVM REE page:

NOTE: on any OS, if installation of REE fails and the output file reports missing readline-devel, zlib-devel, and openssl-devel headers AND you are sure that you have read the packages install instructions - or you are otherwise positive that you have the necessary packages installed in a known location - check your PATH environment variable to make sure something like "/usr/lib" is NOT present. See this REE issue for more information. If you don't want to change your PATH variable then this patch fixes the issue in REE 2010.02

I checked my path and all I had that contained /usr/lib was /usr/lib/lightdm/lightdm. My full $PATH is this: bash: /home/michel/.rvm/gems/ruby-1.9.3-p0/bin:/home/michel/.rvm/gems/ruby-1.9.3-p0@global/bin:/home/michel/.rvm/rubies/ruby-1.9.3-p0/bin:/home/michel/.rvm/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games: No such file or directory.

1

There are 1 answers

0
mbillard On BEST ANSWER

I finally got it working by running this line:

rvm install ree --with-readline-dir=$rvm_path/usr --with-iconv-dir=$rvm_path/usr --with-zlib-dir=$rvm_path/usr --with-openssl-dir=$rvm_path/usr

Running only rvm install ree --with-readline-dir=$rvm_path/usr didn't work, so maybe they all need to be run at the same time.

Note that I ran the following commands some time before succeeding:

rvm head update; rvm reload;

# remove any file from previous failed installations
rvm remove ree

# as suggested in a comment on the question
sudo apt-get install libreadline6-dev

I'm not sure if the libreadline6-dev was necessary, but maybe and it's worth a try if you're having trouble.