I am getting an error message on passing this line of code in the Terminal:

./configure --prefix=/home/username/Server

Error message:

configure: error: pcre-config for libpcre not found. PCRE is required
and available from http://pcre.org/

Error Message on passing the line of code mentioned above

I followed the link mentioned in the error message to extract PCRE-8.40.tar.gz and PCRE2-10.21.tar.gz in home/username/xyz/httpd-2.4.25/srclib.

Then I renamed the extracted folder as PCRE and PCRE2. Yet I am getting the same error message. What am I doing wrong guys?


2 Answers 2


You need to make the PCRE library available to your compiler (strictly speaking, to the build system, which is looking for an installed library, and the pcre-config tool somewhere on the path). The simplest way to do this, if you have root access on your system (or sudo), is to install libpcre3-dev:

sudo apt-get install libpcre3-dev

If you don't have root, you'll have to install PCRE somewhere, build it and install it, then add the resulting bin directory to your path.


Thanks GAD3R for editing my question and making it look better :) Thanks a lot Stephen for solving my problem :)

Here is what I did after reading Stephen's solution:

  • Installed pcre in home/username/xyz/httpd-2.4.25/srclib/pcre. Let me illustrate how to do that:

Let's assume we extracted pcre-8.40.tar.gz in /home/username/downloads/pcre. We can either right-click on the workspace of this folder and click open terminal else type this command on the terminal:

$ cd /home/username/downloads/pcre 

Now, let's install pcre in home/username/xyz/httpd-2.4.25/srclib/pcre (i.e., PATH where you want to install pcre).


$ ./configure home/username/xyz/httpd-2.4.25/srclib/pcre

$ make

$ sudo make install

NOTE: You can install pcre2 by following same procedure.

  • Now, we are ready to install Apache httpd-2.4.25:

Let's assume we extracted httpd-2.4.25.tar.gz in home/username/xyz/httpd-2.4.25 and want to install it in home/username/local/server.


$ cd home/username/xyz/httpd-2.4.25

$ ./configure --prefix= home/username/local/server --with-pcre=home/username/xyz/httpd-2.4.25/srclib/pcre

$ make

$ sudo make install

That's it. :)

If you got any error with apr then download the tar files of apr, apr-iconv and apr-util from apr.apache.org . And, extract it in home/username/xyz/httpd-2.4.25/srclib (i.e., the PATH where you installed httpd -> httpd-2.4.25/srclib).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .