cpan-audit command not found

In this troubleshooting guide we learn how to fix cpan-audit command not found error message

Introduction

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

cpan-audit: command not found

or when using sudo you get the following error message

sudo: cpan-audit: command not found

Solutions to cpan-audit: command not found

How To Fix cpan-audit: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu cpan-audit is provided by libcpan-audit-perl package.

libcpan-audit-perl is:

CPAN::Audit is a module and a database at the same time. It is used by the cpan-audit command line application to query for vulnerabilities.

cpan-audit is a command line application that checks the modules or distributions for known vulnerabilities. It is using its internal database that is automatically generated from a hand-picked database https://github.com/vti/cpan-security-advisory.

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

sudo apt-get -y install libcpan-audit-perl

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

You can also use apt command to install libcpan-audit-perl.

sudo apt -y install libcpan-audit-perl

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

sudo aptitude install libcpan-audit-perl

Summary

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