ubuntu15 安裝nginx 報錯:the HTTP rewrite module requires the PCRE library.

大飛_dafei發表於2018-03-13
./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 編譯安裝nginx報錯以上錯誤:

需要安裝 pcre 包、openssl;執行命令

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

2、安裝完OpenSSL、pcre後:重新編譯nginx報錯:

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

解決方法(指定openssl): sudo ./configure --prefix=/data/server/nginx/nginx-1.13.9/ --with-http_ssl_module

原來命令: sudo ./configure --prefix=/data/server/nginx/nginx-1.13.9/

相關文章