简体   繁体   English

go build runtime:darwin / amd64必须使用make.bash进行引导

[英]go build runtime: darwin/amd64 must be bootstrapped using make.bash

I install golang with brew install go in my mac osx 10.10.4 , when I run go build I got: 我在我的mac osx 10.10.4安装golangbrew install go ,当我运行go build我得到了:

go build runtime: darwin/amd64 must be bootstrapped using make.bash

then refer to the question Cross compile Go on OSX? 然后参考OSX上的Cross compile Go问题

first I tried: 我先尝试过:

brew install go --with-cc-all

but question remain, then I tried: 但问题仍然存在,然后我尝试:

cd /usr/local/go/src
sudo GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 ./make.bash --no-clean

but the question still remains. 但问题仍然存在。 So how can I fix this? 那么我该如何解决这个问题呢?

System Version: OS X 10.10.4 (14E46)
Kernel Version: Darwin 14.4.0
Go Version: go version go1.4.2 darwin/amd64

I built it from source . 我是从源头构建的。 This is what I've done: 这就是我所做的:

From the checkout source, in src : 从结帐源,在src

src $ GOOS=darwin GOARCH=amd64 ./bootstrap.bash
#### Copying to ../../go-darwin-amd64-bootstrap
...
----
Bootstrap toolchain for darwin/amd64 installed in XXX/go-darwin-amd64-bootstrap.
Building tbz.
-rw-r--r--  1 hvn  staff  48149988 Aug 21 10:48 XXX/go-darwin-amd64-bootstrap.tbz

Then I unarchive the tbz and build it as normal: 然后我解压缩tbz并正常构建它:

$ tar xzf XXX/go-darwin-amd64-bootstrap.tbz

cd to that extracted dir. cd到那个提取的目录。 Then 然后

$ ./all.bash
##### Building Go bootstrap tool.
cmd/dist
...

ALL TESTS PASSED

---
Installed Go for darwin/amd64...

$ go-darwin-amd64-bootstrap/bin/go version
go version go1.5 darwin/amd64

Hope that help. 希望有所帮助。

Got the same problem. 得到了同样的问题。

What I did was reinstall Go since I have an existing brew installation 我做的是重新安装Go,因为我有一个现有的Brew安装

brew reinstall go --with-cc-all

When I tried goax command, the problem was fixed 当我尝试goax命令时,问题得到解决

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用 cgo 从 linux/amd64 交叉编译到 darwin/arm64? - How to cross-compile from linux/amd64 to darwin/arm64 with cgo? 在amd64上运行arm64的macOS中的docker - docker in macOS running arm64 on amd64 Go 1.18 在 Mac 上构建错误:“unix/syscall_darwin.1_13.go:25:3: //go:linkname 必须引用声明的 ZC1C425268E68385D14ZA5044” - Go 1.18 build error on Mac: "unix/syscall_darwin.1_13.go:25:3: //go:linkname must refer to declared function or variable" 在 mac os 上安装了“go1.13.3.darwin-amd64.pkg”。 设置 GOPATH、PATH、GOROOT 环境变量。 但是 Go 似乎没有安装 - installed 'go1.13.3.darwin-amd64.pkg' on mac os. Set GOPATH, PATH, GOROOT env variables. But Go doestn't seem to be installed 如何在arm64主机平台上运行amd64 docker镜像 - how to run amd64 docker images on arm64 host platform golang 1.16 cgo/clang 在 darwin/arm64 上构建失败 - golang 1.16 cgo/clang build failed on darwin/arm64 问题 - 在 Macbook M1 芯片上构建 Docker 映像 - 作为 linux/amd64 - Issue - Building Docker Image - as linux/amd64 on Macbook M1 Chip 如何从x86_64-apple-darwin主机为i386-apple-darwin目标构建交叉编译器? - How to build a cross-compiler for i386-apple-darwin target from x86_64-apple-darwin host? M1 docker 预览和 keycloak 'image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8)' 问题 - M1 docker preview and keycloak 'image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8)' Issue Cocoa:在运行时获取 Darwin 版本 - Cocoa: Get Darwin version at runtime
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM