Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Installing Term::ReadLine::Gnu

by Anonymous Monk
on Jun 18, 2010 at 20:27 UTC ( #845457=perlquestion: print w/replies, xml ) Need Help??

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I'm trying to install using this command:
sudo perl -MCPAN -e 'install Term::ReadLine::Gnu'
But it is giving this error:
Found `/usr/lib/libtermcap.a'. cc -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN -fno-stric +t-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFF +SET_BITS=64 -DHAVE_STRING_H rlver.c -o rlver -L/usr/local/lib -lre +adline -ltermcap rlver.c:3:31: error: readline/readline.h: No such file or directory rlver.c: In function ‘main’: rlver.c:4: error: ‘rl_library_version’ undeclared (first use in this f +unction) rlver.c:4: error: (Each undeclared identifier is reported only once rlver.c:4: error: for each function it appears in.) !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!! Could not compile rlver.c.
I am running Ubuntun 8.04 and I have already installed the readline package. See below.
sudo dpkg -l | grep -i readline ii libreadline5 5.2-3build1 + GNU readline and history libraries, run-time ii libterm-readline-perl-perl 1.0302-1 + Perl implementation of Readline libraries ii readline-common 5.2-3build1
Can anyone help me?

Replies are listed 'Best First'.
Re: Installing Term::ReadLine::Gnu
by choroba (Archbishop) on Jun 18, 2010 at 20:32 UTC
    You need the development readline package too, i.e. something like libreadline5-dev, which contains the header files needed to compile rlver.c.

      I agree but I'd go with sudo aptitude install libreadline-dev so you can get the headers for the installed version(s). For what it's worth, I have both 5 and 6 on my Debian Squeeze.

Re: Installing Term::ReadLine::Gnu
by Utilitarian (Vicar) on Jun 20, 2010 at 08:50 UTC
    Ubuntu provides prebuilt apt packages for most CPAN libraries
    :~$ apt-cache search Term::ReadLine::Gnu libterm-readline-gnu-perl - Perl extension for the GNU Readline/Histor +y Library
    So all you have to do is
    :~$ sudo apt-get install libterm-readline-gnu-perl
    Hope that helps
    print "Good ",qw(night morning afternoon evening)[(localtime)[2]/6]," fellow monks."
Re: Installing Term::ReadLine::Gnu
by manoj7shekhawat (Initiate) on Aug 19, 2015 at 18:25 UTC
    we need to install  readline-devel to solve this.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://845457]
Approved by Corion
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2020-02-28 21:37 GMT
Find Nodes?
    Voting Booth?
    What numbers are you going to focus on primarily in 2020?

    Results (127 votes). Check out past polls.