pcre2-config command not found
Introduction
When you run more command in linux terminal / console, you get the following error message
pcre2-config: command not found
or when using sudo you get the following error message
sudo: pcre2-config: command not found
Solutions to pcre2-config: command not found
How To Fix pcre2-config: command not found in Ubuntu / Debian / Kali Linux / Raspbian
In Ubuntu pcre2-config is provided by libpcre2-dev package.
libpcre2-dev is:
This is PCRE2, the new implementation of PCRE, a library of functions to support regular expressions whose syntax and semantics are as close as possible to those of the Perl 5 language. New projects should use this library in preference to the older library, confusingly called pcre3 in Debian.
This package contains the development files, including headers, static libraries, and documentation.
To fix this problem, we can install more using the command below.
sudo apt-get -y install libpcre2-dev
This command might take some time to finish depending on your machine internet connection.
You can also use apt command to install libpcre2-dev.
sudo apt -y install libpcre2-dev
Or if you have aptitude installed you can use the following command.
sudo aptitude install libpcre2-dev
Summary
In this tutorial we learn how to fix pcre2-config command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.