今天编译nginx时,发现没有pcre库,报错如下:

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

安装即可

apt-get install libpcre3 libpcre3-dev

又报错缺少zlib

./configure: error: the HTTP gzip module requires the zlib library.
You can either disable the module by using --without-http_gzip_module
option, or install the zlib library into the system, or build the zlib library
statically from the source with nginx by using --with-zlib=<path> option.
安装

apt-get install zlib1g-dev

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注