CLion Cannot 运行 program "make" 系统找不到指定的文件

CLion Cannot run program "make" The system cannot find the file specified

在 CLion 中打开 makefile 项目时收到错误消息:

Cannot run program "make" (in directory "D:\Werkstudent\XWF\XT_Einzelauswertung"): CreateProcess error=2, The system cannot find the file specified: CreateProcess error=2, The system cannot find the file specified
Make execution failed with exit code = 127

CLion的相关调试日志:

2020-11-23 10:01:57,997 [ 244797]   INFO - System.util.ExternalSystemUtil - External project [D:/Werkstudent/XWF/XT_Einzelauswertung] resolution task started
2020-11-23 10:01:57,997 [ 244797]  DEBUG - om.jetbrains.cidr.cpp.makefile - Makefile analysis started at: 10:01:57 id: analysis:aa0e0ae1-8957-4100-b93e-e389cbdb8646
2020-11-23 10:01:59,285 [ 246085]   INFO - om.jetbrains.cidr.cpp.makefile - MakefileResolverState: Starting make: make clean
2020-11-23 10:01:59,293 [ 246093]  DEBUG - om.jetbrains.cidr.cpp.makefile - Channel closed coroutine name = StandaloneCoroutine{Completed}@60fcd138
2020-11-23 10:01:59,295 [ 246095]  DEBUG - om.jetbrains.cidr.cpp.makefile - Makefile constructor message: com.jetbrains.cidr.cpp.makefile.project.resolver.messages.ConstructorAnalysisError(Make execution failed with exit code = 127)
2020-11-23 10:01:59,305 [ 246105]  DEBUG - om.jetbrains.cidr.cpp.makefile - Makefile analyzer message: com.jetbrains.cidr.cpp.makefile.project.resolver.messages.MakeExecutionError(Make execution failed with exit code = 127)
2020-11-23 10:01:59,315 [ 246115]   INFO - om.jetbrains.cidr.cpp.makefile - MakefileResolverState: Starting make: make --just-print --print-directory --keep-going all
2020-11-23 10:01:59,330 [ 246130]  DEBUG - om.jetbrains.cidr.cpp.makefile - Makefile constructor message: com.jetbrains.cidr.cpp.makefile.project.resolver.messages.CriticalConstructorAnalysisError(Cannot run program "make" (in directory "D:\Werkstudent\XWF\XT_Einzelauswertung"): CreateProcess error=2, The system cannot find the file specified)
2020-11-23 10:01:59,331 [ 246131]  DEBUG - om.jetbrains.cidr.cpp.makefile - Channel closed coroutine name = StandaloneCoroutine{Completed}@742f7782
2020-11-23 10:01:59,330 [ 246130]  DEBUG - om.jetbrains.cidr.cpp.makefile - Makefile analyzer message: com.jetbrains.cidr.cpp.makefile.project.resolver.messages.CriticalAnalysisFailure(Cannot run program "make" (in directory "D:\Werkstudent\XWF\XT_Einzelauswertung"): CreateProcess error=2, The system cannot find the file specified)
2020-11-23 10:01:59,331 [ 246131]  DEBUG - om.jetbrains.cidr.cpp.makefile - Makefile analyzer message: com.jetbrains.cidr.cpp.makefile.project.resolver.messages.MakeExecutionError(Make execution failed with exit code = 127)
2020-11-23 10:01:59,331 [ 246131]  DEBUG - om.jetbrains.cidr.cpp.makefile - Makefile constructor message: com.jetbrains.cidr.cpp.makefile.project.resolver.messages.ConstructorAnalysisError(Make execution failed with exit code = 127)
2020-11-23 10:01:59,361 [ 246161]   INFO - om.jetbrains.cidr.cpp.makefile - make exited with code 127
2020-11-23 10:01:59,361 [ 246161]  DEBUG - om.jetbrains.cidr.cpp.makefile - Makefile constructor message: com.jetbrains.cidr.cpp.makefile.project.resolver.messages.ConstructorAnalysisError(Make execution failed with exit code = 127)
2020-11-23 10:01:59,361 [ 246161]  DEBUG - om.jetbrains.cidr.cpp.makefile - Channel closed coroutine name = StandaloneCoroutine{Completed}@63439922
2020-11-23 10:01:59,371 [ 246171]  DEBUG - om.jetbrains.cidr.cpp.makefile - Makefile analyzer message: com.jetbrains.cidr.cpp.makefile.project.resolver.messages.MakeExecutionError(Make execution failed with exit code = 127)
2020-11-23 10:01:59,371 [ 246171]  DEBUG - om.jetbrains.cidr.cpp.makefile - Makefile constructor message: com.jetbrains.cidr.cpp.makefile.project.resolver.messages.ConstructorAnalysisError(Cannot run program "make" (in directory "D:\Werkstudent\XWF\XT_Einzelauswertung"): CreateProcess error=2, The system cannot find the file specified)
2020-11-23 10:01:59,381 [ 246181]  DEBUG - om.jetbrains.cidr.cpp.makefile - Makefile analyzer message: com.jetbrains.cidr.cpp.makefile.project.resolver.messages.TargetsAnalyzerError(Cannot run program "make" (in directory "D:\Werkstudent\XWF\XT_Einzelauswertung"): CreateProcess error=2, The system cannot find the file specified)
2020-11-23 10:01:59,382 [ 246182]  DEBUG - om.jetbrains.cidr.cpp.makefile - Channel closed coroutine name = StandaloneCoroutine{Completed}@a7d27cb
2020-11-23 10:01:59,382 [ 246182]  DEBUG - om.jetbrains.cidr.cpp.makefile - Makefile constructor message: com.jetbrains.cidr.cpp.makefile.project.resolver.messages.ConstructorAnalysisStatus(Makefile analysis finished. Success = false)
2020-11-23 10:01:59,383 [ 246183]  DEBUG - om.jetbrains.cidr.cpp.makefile - Makefile constructor message: com.jetbrains.cidr.cpp.makefile.project.resolver.messages.CriticalConstructorAnalysisError(No compilation commands found)
2020-11-23 10:01:59,386 [ 246186]  DEBUG - om.jetbrains.cidr.cpp.makefile - Channel closed coroutine name = StandaloneCoroutine{Completed}@258f8a01
2020-11-23 10:01:59,386 [ 246186]  DEBUG - om.jetbrains.cidr.cpp.makefile - Makefile constructor message: ModuleStructureMessage(moduleStructure=ModuleData: XT_Einzelauswertung)
2020-11-23 10:01:59,387 [ 246187]  DEBUG - om.jetbrains.cidr.cpp.makefile - Makefile analysis finished at: 10:01:59 id: analysis:aa0e0ae1-8957-4100-b93e-e389cbdb8646
result: failure
2020-11-23 10:01:59,387 [ 246187]  DEBUG - om.jetbrains.cidr.cpp.makefile - Channel closed coroutine name = StandaloneCoroutine{Completed}@66027050
2020-11-23 10:01:59,416 [ 246216]   INFO - System.util.ExternalSystemUtil - External project [D:/Werkstudent/XWF/XT_Einzelauswertung] resolution task executed in 1419 ms.
2020-11-23 10:01:59,778 [ 246578]   INFO - ge.ExternalProjectsDataStorage - Save external projects data in 20 ms

我做错了什么,为什么 CLion 找不到 make 可执行文件?

确定找到解决方案。

@uta 在 有点对。 CLion 可以找到 make 可执行文件,但 make 依赖于它找不到的一堆其他 coreutils。

所以我必须将 C:\msys64\mingw64\binC:\msys64\usr\bin 添加到我的 windows 路径中。

我是怎么弄明白的? 在 mingw 终端中执行 mingw32-make 工作正常。
所以我在 CLion 的终端中执行了 mingw32-make clean,这给了我描述的错误。所以错误消息不是来自 CLion,而是来自 make 命令本身。
之后,我尝试仅在 CLion 中将这两条路径添加到 PATH,但我找不到它的选项。所以最终我不得不将它添加到系统环境变量中。还不知道这是否因为可执行文件名称的冲突而搞砸了其他事情。

哦,现在我在“配置项目”步骤中遇到错误,可能是因为解析错误..