CentOS上安装Nginx报错解决一例

2022-07-04 13:52:03 浏览数 (1)

CentOS上编译安装装Nginx时候报如下错误:

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

重新编译,指定 --with-pcre, 其中 --with-pcre=/linuxidc/download/pcre-8.35 是pcre是的源码目录,不是安装目录

[www.linuxidc.com@localhost nginx-1.7.0]$ ./configure --prefix=/usr/local/nginx --with-pcre=/linuxidc/download/pcre-8.35

这样就不报错了。

0 人点赞