编译Nginx报错make: *** No rule to make target 'build', needed by 'default'. Stop.

原因:

依赖的组件没安装

 

解决方法:

Ubuntu

apt install openssl gcc zlib1g libpcre3

 Redhat/CentOS

yum install openssl gcc zlib pcre

 

安装组件后,重新执行编译和安装Nginx命令:

./configure
make && make install

 

测试:

启动Nginx:

/usr/local/nginx/sbin/nginx

在浏览器打开地址:http://localhost

 

PS:如果不想折腾,可以直接用命令的方式安装Nginx(apt install nginx)

 

posted @ 2022-01-12 23:36  Clotho_Lee  阅读(6449)  评论(0编辑  收藏  举报