countperl command not found

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

Introduction

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

countperl: command not found

or when using sudo you get the following error message

sudo: countperl: command not found

Solutions to countperl: command not found

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

In Ubuntu countperl is provided by libperl-metrics-simple-perl package.

libperl-metrics-simple-perl is:

Perl::Metrics::Simple is a Perl module that provides several useful methods for static analysis of one or many Perl files. It currently offers these metrics: packages, subroutines, lines of code, and an approximation of cyclomatic (mccabe) complexity for the subroutines and the “main” portion of the code.

This module is designed to be simpler than the similar Perl::Metric module.

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

sudo apt-get -y install libperl-metrics-simple-perl

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

You can also use apt command to install libperl-metrics-simple-perl.

sudo apt -y install libperl-metrics-simple-perl

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

sudo aptitude install libperl-metrics-simple-perl

Summary

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