How to install pcre and pcre-devel on ubuntu using apt-get?

The PCRE library is a set of functions that implement regular expression pattern matching . This is being used in many high profile open source projects like Apache, Nginx  and PHP. While i was trying to compile and install nginx on my staging machine, following error was thrown

Configure script complains “pcre” library is missing on the server, which is required by “nginx” rewrite module. Either we need to disable the rewrite module in nginx or we have to install pcre library on the machine. As you know, rewrite functionality is very much critical for any webserver to manipulate the URLs.

In this article we will see how to install pcre and pcre-devel on Ubuntu and Centos

On Centos machine, I can install “pcre” and “pcre-devel” packages using yum .

How to install pcre and pcre-devel on Ubuntu ?

On ubuntu machines, the apt-get package names for “pcre” and  “pcre development packages are “libpcre3”   and “libpcre3-dev” . Run the following commands to install

On my machine, “libpcre3” was already installed and i had to install only “libpcre3-dev”

As always, feel free to drop us a note if you have any queries or feedbacks using our comment form below. Always happy to help you 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *