【问题标题】:env: ‘go’: No such file or directory make: *** [Makefile:43: build] Error 127?env: ‘go’: 没有这样的文件或目录 make: *** [Makefile:43: build] 错误 127?
【发布时间】:2021-05-19 00:38:01
【问题描述】:

https://github.com/ChainSafe/ChainBridge

为什么这个命令不起作用?

make build

我在本地克隆了 repo,cd 到了正确的文件夹中;我在 Git CLI 中得到的只是

  >  \033[32mBuilding binary...\033[0m
cd cmd/chainbridge && env GOARCH=amd64 go build -o ../../build/chainbridge -ldflags="-X main.Version=v.1.1.2-2-g6f55404"
env: ‘go’: No such file or directory
make: *** [Makefile:43: build] Error 127

我下载了适用于 Windows 10 64 位的 Go,版本 1.16.4

【问题讨论】:

    标签: go go-ethereum


    【解决方案1】:

    使用 Go,您不再需要使用 Makefile。我认为人们只是出于习惯而这样做。我不同意这种做法,因为 Go 是一门新语言,我不希望看到人们继续使用过去的旧垃圾工具来滥用它。为此,您只需下载代码,然后将位置更改为:

    cmd\chainbridge
    

    然后运行:

    go build
    

    我知道这行得通,因为我刚刚使用go version go1.16.3 windows/amd64 做到了。此外,您需要确保go.exe 在您的PATH 上。您可能需要添加 C:\go\bin 或类似名称。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-03-23
      • 1970-01-01
      • 2013-12-09
      • 1970-01-01
      • 2021-06-11
      • 2016-01-10
      • 1970-01-01
      • 2020-12-02
      相关资源
      最近更新 更多