make: *** 没有规则可以创建“default”需要的目标“build”。 停止。(22.11.27)

您所在的位置:网站首页 没有规则可以创建all需要的目标 make: *** 没有规则可以创建“default”需要的目标“build”。 停止。(22.11.27)

make: *** 没有规则可以创建“default”需要的目标“build”。 停止。(22.11.27)

2024-07-11 13:24| 来源: 网络整理| 查看: 265

解决链接

问题描述

安装Nginx时,执行以下命令,会出现以下错误信息:

[root@localhost nginx-1.16.1]# make && make install make: *** 没有规则可以创建“default”需要的目标“build”。 停止。 问题分析

相关的依赖包不存在,需要安装

解决步骤 Nginx所需依赖包介绍: gcc

功能:预处理、编译、连接、汇编

openssl

功能:用于网站加密通讯。

pcre

功能:用于支持解析正则表达式。

zlib

功能:用于对数据进行解压缩。网站之间通信时,数据先压缩再传输,通过消耗CPU的方式来节省网络带宽。

安装Nginx的依赖包 [root@localhost nginx-1.16.1]# yum -y install gcc openssl openssl-devel pcre-devel zlib zlib-devel 验证安装是否成功 [root@localhost nginx-1.16.1]# ./configure --prefix=/usr/local/nginx --user=nginx --group=nginx --with-http_ssl_module ... Configuration summary + using system PCRE library + using system OpenSSL library + using system zlib library nginx path prefix: "/usr/local/nginx" nginx binary file: "/usr/local/nginx/sbin/nginx" nginx modules path: "/usr/local/nginx/modules" nginx configuration prefix: "/usr/local/nginx/conf" nginx configuration file: "/usr/local/nginx/conf/nginx.conf" nginx pid file: "/usr/local/nginx/logs/nginx.pid" nginx error log file: "/usr/local/nginx/logs/error.log" nginx http access log file: "/usr/local/nginx/logs/access.log" nginx http client request body temporary files: "client_body_temp" nginx http proxy temporary files: "proxy_temp" nginx http fastcgi temporary files: "fastcgi_temp" nginx http uwsgi temporary files: "uwsgi_temp" nginx http scgi temporary files: "scgi_temp" [root@localhost nginx-1.16.1]# make && make install //编译和安装 ... test -d '/usr/local/nginx/logs' \ || mkdir -p '/usr/local/nginx/logs' test -d '/usr/local/nginx/logs' \ || mkdir -p '/usr/local/nginx/logs' test -d '/usr/local/nginx/html' \ || cp -R html '/usr/local/nginx' test -d '/usr/local/nginx/logs' \ || mkdir -p '/usr/local/nginx/logs' make[1]: 离开目录“/root/nginx-1.16.1” 重新启动Nginx [root@localhost nginx-1.16.1]# /usr/local/nginx/sbin/nginx [root@localhost nginx-1.16.1]# ps -ef | grep nginx

在这里插入图片描述 再执行之前报错的命令就可以啦!

注意

如果这个方法还是不行,可以检查 ./configure后面的选项是否有误,或者选项中的路径是否正确,也可以看一下系统提示哪些是 —not found的,看缺少哪些依赖包。



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3