test-regexp-pattern command not found

In this troubleshooting guide we learn how to fix test-regexp-pattern command not found error message

Introduction

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

test-regexp-pattern: command not found

or when using sudo you get the following error message

sudo: test-regexp-pattern: command not found

Solutions to test-regexp-pattern: command not found

How To Fix test-regexp-pattern: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu test-regexp-pattern is provided by libtest-regexp-pattern-perl package.

libtest-regexp-pattern-perl is:

Test::Regexp::Pattern performs various checks on a module’s Regexp::Pattern patterns. It is recommended that you include something like release-regexp-pattern.t in your distribution if you add regexp patterns to your code. If you use Dist::Zilla to build your distribution, there is Test::Regexp::Pattern to make it easy to do so.

Regexp::Pattern is a convention for organizing reusable regexp patterns in modules.

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

sudo apt-get -y install libtest-regexp-pattern-perl

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

You can also use apt command to install libtest-regexp-pattern-perl.

sudo apt -y install libtest-regexp-pattern-perl

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

sudo aptitude install libtest-regexp-pattern-perl

Summary

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