Ubuntu15 install nginx error: the HTTP rewrite module requires the PCRE library.

./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.

Ubuntu15 compiles and installs nginx and reports the above error:

Need to install the pcre package, openssl; execute the command

sudo apt-get update
sudo apt-get install libpcre3 libpcre3-dev
sudo apt-get install openssl libssl-dev

2. After installing OpenSSL and pcre: recompile nginx and report an error:

Configuration summary
  + using system PCRE library
  + OpenSSL library is not used
  + using system zlib library

Workaround (specify openssl): sudo ./configure --prefix=/data/server/nginx/nginx-1.13.9/ --with-http_ssl_module

Original command: sudo ./configure --prefix=/data/server/nginx/nginx-1.13.9/

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325978351&siteId=291194637