Install libreadline-dev --ReadLine library for saving and searching command execution history

Install libreadline-dev, which contains the ReadLine library and headers for saving and retrieving command execution history, with the apt command.

sudo apt install -y libreadline-dev

For the location of the installed ReadLine header files and libraries, see Header file read path and Library loading path.

How to use Perl's debugger command line history

The command history feature of Perl Debugger depends on a module called Term::ReadLine::Gnu. Relies on the ReadLine library written in C.

If you're running the Perl debugger on Ubuntu and the command history doesn't work with the up and down keys, suspect that the Term::ReadLine::Gnu library isn't installed.

After installing the libreadline-dev package, install Term::ReadLine::Gnu using cpanm.

cpanm Term::ReadLine::Gnu

Associated Information