[英]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
安装golang
和brew 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.