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

1.安装nginx执行./configure…会在最后报以下几种错误,之后执行make就会报:make: *** No rule to make target build', needed bydefault’. 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= 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= 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

发布了118 篇原创文章 · 获赞 26 · 访问量 6万+

猜你喜欢

转载自blog.csdn.net/qq_43147136/article/details/84824740