linux安装nginx make&make install报错:make: *** No rule to make target `build‘, needed by `default‘. Sto

linux安装./configure --prefix=/usr/local/nginx报错:
报错1:
./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= option.

查看网上解决方法:
安装pcre-devel解决问题
yum -y install pcre-devel

报错2:
./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= option.

等等可能是因为缺少库导致的,所以我们需要安装前置库:
yum install -y gcc pcre pcre-devel openssl openssl-devel gd gd-devel

然后再次重新编译安装nginx.

原文地址:https://www.cnblogs.com/javakfz/p/13938228.html