perlsh command not found

In this troubleshooting guide we learn how to fix perlsh command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

perlsh: command not found

or when using sudo you get the following error message

sudo: perlsh: command not found

Solutions to perlsh: command not found

How To Fix perlsh: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu perlsh is provided by libterm-readline-gnu-perl package.

libterm-readline-gnu-perl is:

Term::ReadLine::Gnu is a Perl interface to the GNU ReadLine Library, allowing developers to provide features including input line editing, input history management, word completion and more.

Through this module, you have access to almost all variables and functions as documented in the GNU ReadLine/History Library. This means you can write your custom editing function, custom completion function, and so on, with Perl. You may find it useful for prototyping before programming with C.

To fix this problem, we can install more using the command below.

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

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install libterm-readline-gnu-perl.

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

Or if you have aptitude installed you can use the following command.

sudo aptitude install libterm-readline-gnu-perl

Summary

In this tutorial we learn how to fix perlsh command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.