Last Updated: February 25, 2016
·
4.713K
· ksi

Perl: Install Term::ReadLine::Gnu on OSX

Assuming, homebrew is installed, first do:

brew install readline
cpan Term::ReadLine
cpan

Now comes the tricky part. Inside the cpan shell:

look Term::ReadLine::Gnu
perl Makefile.PL --includedir=$(brew info readline|egrep '[[:digit:]]+ files,'|awk '{print $1}')/include/ --libdir=$(brew info readline|egrep '[[:digit:]]+ files,'|awk '{print $1}')/lib/
make install
^D # to quit sub-shell
quit

Done.

I suggest using perlbrew as well.

3 Responses
Add your response

excellent! thank you very much for this solution ...

over 1 year ago ·

Jesus, you life saver, I'm crying, seriously. Tears dropping out of my eyes.

over 1 year ago ·

Rock on. Exactly what I was looking for.

over 1 year ago ·