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 

成功了。

 

 

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