CPAN: Terminal does not support GetHistory / AddHistory in Ubuntu

Using CPAN in Ubuntu Lucid Lynx (10.04), the command line history was broken and the up/down keys only triggered escape codes such as ^[[A. Additionally, the following error messages showed up on CPAN startup (only one of them at a time):

Terminal does not support GetHistory
Terminal does not support AddHistory

Term::ReadLine was correctly installed, but when I tried to install Bundle::CPAN, I got failed tests for Term::ReadLine::Perl. So I did:

look Term::ReadLine::Perl

to inspect the build folder, tried the test which actually seems to work. Installing the module from the shell with:

make install

was sucessful, and after restarting CPAN I had my terminal working properly. Anyway, it seems Term::ReadLine still isn't functionning perfectly:

perl -MTerm::ReadLine::Perl
Can't locate object method "Features" via package "Term::ReadLine::Stub" at /opt/perl-5.12.1/lib/site_perl/5.12.1/Term/ReadLine/ line 101.
Compilation failed in require.
BEGIN failed--compilation aborted.

Xavier Robin
Published Saturday, August 28, 2010 17:10 CEST
Permalink: /blog/2010/08/28/cpan-terminal-does-not-support-gethistory-addhistory-in-ubuntu
Tags: Programming
Comments: 4


By Liz on Friday, March 11, 2011 18:12 CET

I am having the same issue.

By Bata ILIC on Monday, May 30, 2011 13:39 CEST

cpan Term::ReadLine::Gnu should fix this

By richard on Sunday, August 14, 2011 10:58 CEST

in ubuntu 10.10, i did:

sudo apt-get install libterm-readline-gnu-perl

then it's OK

By Rudolf Meyer on Thursday, October 4, 2012 10:27 CEST

Installing libterm-readline-gnu-perl soved the problem. History now just works fine in CPAN.

New comment

* denotes a mandatory field.

By submitting your message, you accept to publish it under a CC BY-SA 3.0 license.

Some HTML tags are allowed: a[href, hreflang, title], br, em, i, strong, b, tt, samp, kbd, var, abbr[title], acronym[title], code, q[cite], sub, sup.

Passer en français



Background noise Books Computers Fun Hobbies Internet Me Mozilla My website Photo Politics Programming School Software Ubuntu pROC

Recent posts