Nginx编译安装出现错误the HTTP rewrite module requires the PCRE library怎么办
错误提示可能如下:
configuring additional modules
adding module in /backup/www.ctohome.com/ngx_cache_purge-2.3
+ ngx_http_cache_purge_module was configured
adding module in /backup/www.ctohome.com/ngx_http_substitutions_filter_module-master
+ ngx_http_subs_filter_module was configured
checking for PCRE library ... not found
checking for PCRE library in /usr/local/ ... not found
checking for PCRE library in /usr/include/pcre/ ... not found
checking for PCRE library in /usr/pkg/ ... not found
checking for PCRE library in /opt/local/ ... not found
./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.
make: *** No rule to make target `build', needed by `default'. Stop.
make: *** No rule to make target `install'. Stop.
***** nginx install failed *****
解决办法:
先安装pcre-devel,然后在重装nginx
yum -y install pcre pcre-devel