MINGW64“make build”错误:“bash: make: command not found”

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/36770716/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-08 22:15:12  来源:igfitidea点击:

MINGW64 "make build" error: "bash: make: command not found"

bashgomakefilemingwglide-golang

提问by Vallabha Vamaravelli

I am working on Windows 10. I want to run a "make build" in MINGW64 but following error comes up:

我在 Windows 10 上工作。我想在 MINGW64 中运行“make build”,但出现以下错误:

$ make build
bash: make: command not found

I want to build Glide for Golang

我想为 Golang构建Glide

I tried following:

我尝试了以下操作:

$ sudo yum install build-essential
bash: sudo: command not found

As well as:

也:

$ yum install build-essential
bash: yum: command not found

And:

和:

$ apt-cyg build-essential
bash: apt-cyg: command not found

How can I "work-around" this problem?

我怎样才能“解决”这个问题?

采纳答案by DistordAngel

You have to install mingw-get and after that you can run mingw-get install msys-maketo have the command make available.

您必须安装 mingw-get,然后才能运行mingw-get install msys-make以使命令可用。

Here is a link for what you want http://www.mingw.org/wiki/getting_started

这是您想要的链接http://www.mingw.org/wiki/getting_started

回答by Vallabha Vamaravelli

  • Go to ezwinports, https://sourceforge.net/projects/ezwinports/files/

  • Download make-4.2.1-without-guile-w32-bin.zip (get the version without guile)

  • Extract zip
  • Copy the contents to C:\ProgramFiles\Git\mingw64\ merging the folders, but do NOT overwrite/replace any exisiting files.
  • 转到ezwinports,https://sourceforge.net/projects/ezwinports/files/

  • 下载make-4.2.1-without-guile-w32-bin.zip(获取没有guile的版本)

  • 解压缩
  • 将内容复制到 C:\ProgramFiles\Git\mingw64\ 合并文件夹,但不要覆盖/替换任何现有文件。

回答by Juan Calero

You can also use Chocolatey.

您也可以使用巧克力。

Having it installed, just run:

安装后,只需运行:

choco install make

When it finishes, it is installed and available in Git for Bash / MinGW.

完成后,它会安装并在 Git for Bash / MinGW 中可用。

回答by lallolu

Try using cmake itself. In the build directory, run:

尝试使用 cmake 本身。在构建目录中,运行:

cmake --build .

cmake --build 。