英文:
go build runtime: darwin/amd64 must be bootstrapped using make.bash
问题
我在我的Mac OS X 10.10.4上使用brew install go
安装了golang
,当我运行go build
时,出现了以下错误信息:
go build runtime: darwin/amd64 must be bootstrapped using make.bash
然后我参考了这个问题Cross compile Go on OSX?
首先我尝试了:
brew install go --with-cc-all
但问题仍然存在,然后我尝试了:
cd /usr/local/go/src
sudo GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 ./make.bash --no-clean
但问题仍然存在。那么我该如何解决这个问题呢?
系统版本:OS X 10.10.4 (14E46)
内核版本:Darwin 14.4.0
Go版本:go version go1.4.2 darwin/amd64
英文:
I install golang
with brew install go
in my mac osx 10.10.4
, when I run go build
I got:
go build runtime: darwin/amd64 must be bootstrapped using make.bash
then refer to the question Cross compile Go on OSX?
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
答案1
得分: 2
我从源代码构建了它。这是我所做的:
从检出的源代码中,在“src”目录下:
src $ GOOS=darwin GOARCH=amd64 ./bootstrap.bash
#### 复制到 ../../go-darwin-amd64-bootstrap
...
----
在 XXX/go-darwin-amd64-bootstrap 中安装了 darwin/amd64 的引导工具链。
构建 tbz。
-rw-r--r-- 1 hvn staff 48149988 Aug 21 10:48 XXX/go-darwin-amd64-bootstrap.tbz
然后,我解压缩 tbz 文件并按照正常方式构建:
$ tar xzf XXX/go-darwin-amd64-bootstrap.tbz
切换到解压后的目录。然后执行:
$ ./all.bash
##### 构建 Go 引导工具。
cmd/dist
...
所有测试通过
---
安装了 darwin/amd64 的 Go...
$ go-darwin-amd64-bootstrap/bin/go version
go version go1.5 darwin/amd64
希望对你有所帮助。
英文:
I built it from source. This is what I've done:
From the checkout source, in 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:
$ tar xzf XXX/go-darwin-amd64-bootstrap.tbz
cd to that extracted dir. 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.
答案2
得分: 1
我遇到了同样的问题。
我所做的是重新安装 Go,因为我已经有了 brew 安装。
brew reinstall go --with-cc-all
当我尝试使用 goax
命令时,问题就解决了。
英文:
Got the same problem.
What I did was reinstall Go since I have an existing brew installation
brew reinstall go --with-cc-all
When I tried goax
command, the problem was fixed
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论