make: *** No targets specified and no makefile found. Stop.
时间: 2023-10-21 11:37:28 浏览: 25
This error message means that the make command was executed without any targets specified, and there is no makefile present in the current directory.
A makefile is a script that specifies how to build a program or set of programs, and typically includes information about dependencies, compiler options, and other build details.
To resolve this error, you need to either specify a target for the make command (e.g. `make targetname`), or create a makefile in the current directory that defines the build process for your program.
相关问题
make: *** no targets specified and no makefile found. stop.
这个错误信息通常表示在执行make命令时没有指定目标,并且也没有找到Makefile文件。Makefile是一个包含了编译和链接规则的文本文件,用于告诉make命令如何构建项目。
要解决这个问题,你可以尝试以下几个步骤:
1. 确保你在正确的目录下执行make命令。Makefile通常位于项目的根目录下,所以你需要在该目录下执行make命令。
2. 检查是否存在Makefile文件。你可以使用ls命令或者其他文件管理工具来确认当前目录下是否存在Makefile文件。如果不存在,你需要创建一个Makefile文件,并在其中定义编译和链接规则。
3. 如果存在Makefile文件,确保其中定义了至少一个目标。Makefile文件中应该包含一些规则,用于指定如何编译和链接源代码文件以生成可执行文件或库文件。
如果你已经检查了以上步骤,但问题仍然存在,请提供更多的上下文信息,例如你正在尝试构建的项目类型、操作系统等,以便我能够更好地帮助你解决问题。
Redis安装:make: *** No targets specified and no makefile found. Stop.
当Redis安装时出现"make: *** No targets specified and no makefile found. Stop."的错误时,可以尝试以下解决方法:
1. 确保已经正确下载并解压了Redis源代码文件。
2. 进入Redis源代码文件所在的目录,通常是通过cd命令进入该目录。
3. 运行make命令进行编译,如果出现报错信息,可以尝试先安装gcc编译器,可以通过执行"apt-get install gcc"命令来安装。
4. 如果仍然无法解决问题,可以尝试将Redis解压文件删除,重新解压,并再次执行make命令。
5. 进入Redis的src目录,执行make命令。
6. 最后一种方式是进入Redis目录(例如/opt/redis),执行make命令。
通过以上步骤,您应该能够成功解决"make: *** No targets specified and no makefile found. Stop."的错误并完成Redis的安装。<span class="em">1</span><span class="em">2</span><span class="em">3</span>