从源安装时出错

Abh*_*Adr 5 go

我正在尝试从源安装

我按照这个步骤

git clone https://go.googlesource.com/go
cd go
git checkout go1.6.1

cd src
./all.bash
Run Code Online (Sandbox Code Playgroud)

现在它给我的错误说

##### Building Go bootstrap tool.
cmd/dist
ERROR: Cannot find /root/go1.4/bin/go.
Set $GOROOT_BOOTSTRAP to a working Go tree >= Go 1.4.
Run Code Online (Sandbox Code Playgroud)

任何想法我该如何解决这个问题,我只需要设置env变量还是需要任何其他安装?

Art*_*Art 6

您需要安装 Go 版本 1.4 或更高版本才能构建最新的 Go 版本。构建脚本默认为某个路径,但如果它不存在,则需要设置 GOROOT_BOOTSTRAP 环境变量以指向以前工作的 Go 安装。