windows - 如何运行 YoloV3 Darknet 的“make”命令(适用于 Windows)?
问题描述
运行 ./make.exe 命令(通过使用 GNUWin32)后,我收到以下错误:
mkdir -p obj
mkdir -p backup
A subdirectory or file -p already exists.
Error occurred while processing: -p. make: *** [backup] Error 1
重新运行命令后,我得到一个不同的错误:
mkdir -p results
A subdirectory or file -p already exists.
Error occurred while processing: -p.
make: *** [results] Error 1
然后,无论我重复 make 命令多少次,我都会得到相同的错误:
gcc -Iinclude/ -Isrc/ -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -c ./src/gemm.c -o obj/gemm.o
process_begin: CreateProcess(NULL, gcc -Iinclude/ -Isrc/ -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -c ./src/gemm.c -o obj/gemm.o, ...) failed.
make (e=2): The system cannot find the file specified.
make: *** [obj/gemm.o] Error 2
由于我是初学者,您能否提供有关如何解决问题的详细说明?
解决方案
这些问题:
mkdir -p obj
mkdir -p backup
A subdirectory or file -p already exists.
Error occurred while processing: -p. make: *** [backup] Error 1
是因为您要求 Make 在 Windows 上执行一个为在 Linux 或其他类似 Unix 操作系统上工作而编写的 makefile。
在类 Unix 操作系统中,命令:
mkdir -p obj
意思是:如果它已经存在,则创建一个 obj
没有错误的目录。在 Windows 中,这意味着:创建一个名为的目录 -p
,然后创建一个名为 obj
.
因此,当mkdir -p obj
创建了目录-p
和obj
命令时:
mkdir -p backup
失败是因为:
A subdirectory or file -p already exists.
Unix/Linux makefile 无意创建一个名为 的目录-p
,但在 Windows 上它就是这样做的。
您尝试修复此特定错误毫无意义。这只是尝试在 Windows 上执行 Unix/Linux makefile 导致的无数错误中的第一个。您需要一个为在 Windows 上运行而编写的 makefile,或者自己编写一个,或者找到一种在不使用 Make 的 Windows 上构建软件的方法。
这个问题:
gcc -Iinclude/ -Isrc/ -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -c ./src/gemm.c -o obj/gemm.o
process_begin: CreateProcess(NULL, gcc -Iinclude/ -Isrc/ -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -c ./src/gemm.c -o obj/gemm.o, ...) failed.
make (e=2): The system cannot find the file specified.
make: *** [obj/gemm.o] Error 2
是因为您的计算机上没有安装GCC C 编译器
gcc
,或者如果您有,它所在的目录不在您的PATH
. 所以 Make 找不到它来执行编译和链接软件的基本业务。
推荐阅读
- php - 如何获取逗号分隔列表之前的第一个值?
- three.js - A 帧截头体剔除
- java - Firebase FCM 在尝试推送通知时返回 403 SenderId mismatch PERMISSION_DENIED
- logstash - Logstash 7.10.02 在 windows 上启动失败
- c# - 启动 Chrome WebDriver 的问题
- firebase - 有没有机会在没有托管的情况下托管 Firebase 应用程序
- xamarin.forms - xamarin.forms 从代码中的数据模板将数据源馈送到视图中
- redhat - 如何在 Redhat 8 上安装 chrony
- c - 使用没有 stdio 的 C 清除来自 stdin 的剩余输入
- .net-core - iAnywhere.Data.SQLAnywhere.SAException 连接错误:连接已断开(可能不是 SQL Anywhere 服务器)