Installing readline on Kubuntu

Running script/console provides the delightful answer:

/usr/local/lib/ruby/1.8/irb/completion.rb:10:in `require’:
no such file to load – readline (LoadError)

Turns out that Kubuntu doesn’t have the curses libraries.

Here’s the begining of a solution

apt-get install libncurses5-dev libreadline5-dev (Ubuntu/Debian)

Then recompile the readline extension and go from there.

cd ext/readline
ruby extconf.rb
make
sudo make install

Read more

Tags: , ,

10 Responses to “Installing readline on Kubuntu”

  1. Matt March 6, 2006 at 1:53 am #

    Niether does ubuntu (well that was pretty obvious if kububtu didnt have them) but thanks for this, i was so confused..

  2. mutejute March 6, 2006 at 1:53 am #

    thanks for your blog on this. im using ubuntu. i followed your instructions. now my irb has tab completion! thanks a rubillion! :)

  3. Pascal March 6, 2006 at 1:53 am #

    Thank you for the kind words. I’m thrilled you found this useful!

  4. Pete March 6, 2006 at 1:53 am #

    exactly how does one go about “recompiling the readline extension”?

  5. Pascal March 6, 2006 at 1:53 am #

    Pete,
    assuming you’ve compiled ruby from source, or you have the source available, you would go in the ext/readline directory of your ruby source. From there, typying

    ruby extconf.rb
    make clean
    sudo make install

    should do it.
    If you have not installed ruby from source, you might be able to get away from getting the source and compiling readline by itself. In my case, the available version of ruby via apt-get was older, so I went for ruby 1.8.4 but readline didn’t build when I first went through the install because of the missing dependencies.

  6. The allnighter March 6, 2006 at 1:53 am #

    thank you very much. it fixed my problem on my ubuntu.
    Merci beaucoup :)

  7. Pascal March 6, 2006 at 1:53 am #

    Glad you found this helpful!

  8. Andrew Arnott March 6, 2006 at 1:53 am #

    Thanks much!

  9. tayfun March 6, 2006 at 1:53 am #

    thanks for the tips :)

  10. blaupunkt March 6, 2006 at 1:53 am #

    Thank you! I built ruby 1.8.6 from the source and had this problem.