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

1.安裝nginx執行./configure...會在最後報以下幾種錯誤,之後執行make就會報make: *** No rule to make target `build', needed by `default'. Stop.錯誤。

注:個人經歷,錯誤1、2、3可能會逐個出現,所以出現那個就解決那個吧。我把第三個處理了才ok的。

錯誤列表:

(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=<path> option.

(2)

./configure: error: the HTTP cache module requires md5 functions

from OpenSSL library.  You can either disable the module by using

--without-http-cache option, or install the OpenSSL library into the system,

or build the OpenSSL library statically from the source with nginx by using

--with-http_ssl_module --with-openssl=<path> options.

(3)   

./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 

網上解決辦法:

需要安裝openssl以及ncurses組件

yum install -y openssl*

yum -y install ncurses-devel

2.但執行以上操作依然不行:

經過一番折騰~發現在執行.configure時就報了很多錯誤:上述錯誤,因此需要逐個解決!

解決辦法:

出現(1)錯誤:

需要安裝pcre包:

下載地址:https://ftp.pcre.org/pub/pcre/

tar zxvf pcre-8.12.tar.gz

cd pcre-8.12

./configure

make

make install

出現(2)錯誤:

需要安裝openssl

下載地址:http://gnuwin32.sourceforge.net/packages/openssl.htm

tar zxvf openssl-0.9.8h.tar.gz

cd openssl-0.9.8h

./config --prefix=/usr/local/ --openssldir=/usr/local/openssl -g3 shared zlib-dynamic enable-camellia

make

make install

測試是否安裝成功:openssl version

出現(3)錯誤:

需要安裝zlib包:

下載地址:http://www.zlib.net/

tar zxvf zlib-1.2.11.tar.gz

cd zlib-1.2.11

./configure

make

make install

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