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

报错如下:

 

百度上说是要安装前置依赖,像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 

成功了。

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章