viewperl command not found

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

Introduction

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

viewperl: command not found

or when using sudo you get the following error message

sudo: viewperl: command not found

Solutions to viewperl: command not found

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

In Ubuntu viewperl is provided by libsyntax-highlight-perl-improved-perl package.

libsyntax-highlight-perl-improved-perl is:

Syntax::Highlight::Perl::Improved provides syntax highlighting for Perl code. The design bias is roughly line-oriented and streamed (ie, processing a file line-by-line in a single pass). Provisions may be made in the future for tasks related to “back-tracking” (i.e., re-doing a single line in the middle of a stream) such as speeding up state copying.

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

sudo apt-get -y install libsyntax-highlight-perl-improved-perl

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

You can also use apt command to install libsyntax-highlight-perl-improved-perl.

sudo apt -y install libsyntax-highlight-perl-improved-perl

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

sudo aptitude install libsyntax-highlight-perl-improved-perl

Summary

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