nginx ./configure error ubuntu 12.04
NginxNginx Problem Overview
after downloading and trying to configure nginx when um executing the command ./configure um getting this error
./configure: error: the HTTP rewrite module requires the PCRE library.
You can either disable the module by using --without-http_rewrite_module
option, or install the PCRE library into the system, or build the PCRE library
statically from the source with nginx by using --with-pcre=<path> option.
and I execute the
apt-get build-dep nginx
command um getting the following error
The following packages have unmet dependencies:
libgd2-noxpm-dev : Depends: libgd2-noxpm (= 2.0.36~rc1~dfsg-6ubuntu2) but it is not going to be installed
E: Build-dependencies for nginx could not be satisfied.
I dont have any idea about the libgd2-noxpm. This is my first time with nginx . how to overcome from this error . Thank you in advance
Nginx Solutions
Solution 1 - Nginx
You have to install pcre3:
apt-get install libpcre3 libpcre3-dev
The library is required for regular expressions support in the location directive and for the ngx_http_rewrite_module module. http://nginx.org/en/docs/install.html
Solution 2 - Nginx
apt-get build-dep nginx
just resolved my problem....
Solution 3 - Nginx
Here are the steps that you need to follow for Nginx installation on Ubuntu 18.04:
1: Install build essential sudo apt-get install build-essential
You may receive "udo apt-get install libpcre3 libpcre3-dev"
2: sudo apt-get install libpcre3 libpcre3-dev
3: sudo apt-get install zlib1g zlib1g-dev
4: sudo apt-get install -y libssl-dev
Solution 4 - Nginx
For someone who met same issue under CentOS system:
yum -y install pcre-devel openssl openssl-devel