centos 7.2 make: *** No rule to make target `build', needed by `default'. Stop.

在新的服务器安装nginx,在make编译时报错:

make: *** No rule to make target `build', needed by `default'. Stop.

错误重现

进入nginx的目录,先编译参数:

./configure \

--prefix=/usr/local/nginx \

--pid-path=/usr/local/nginx/run \

--user=nginx \

--group=nginx \

--with-http_ssl_module \

--with-http_flv_module \

--with-http_stub_status_module \

--with-http_gzip_static_module \

--with-pcre \

--with-http_image_filter_module \

--with-debug \

 

然后  make

报错如下:

centos 7.2 make: *** No rule to make target `build', needed by `default'. Stop._第1张图片

 

百度上说是要安装前置依赖,像gcc ,openssl等,但是我make之前已经安装了这些依赖。

我的解决方式:

更新yum

yum update

更新完成后,先删除之前准备make的nginx包,然后重新解压一个。

 

安装前置库:

[root@cqakserver local]# yum install -y gcc pcre pcre-devel openssl openssl-devel gd gd-devel

进入nginx目录重新编译一次参数:

./configure \

--prefix=/usr/local/nginx \

--pid-path=/usr/local/nginx/run \

--user=nginx \

--group=nginx \

--with-http_ssl_module \

--with-http_flv_module \

--with-http_stub_status_module \

--with-http_gzip_static_module \

--with-pcre \

--with-http_image_filter_module \

--with-debug \

 

再次 make && make install 

成功了。

centos 7.2 make: *** No rule to make target `build', needed by `default'. Stop._第2张图片

centos 7.2 make: *** No rule to make target `build', needed by `default'. Stop._第3张图片

 

 

你可能感兴趣的:(Linux,nginx)