Go 1.5 之后,由于实现了自举,需要先安装之前的版本,然后得配置 GOROOT_BOOTSTRAP 环境变量:
```
ERROR: Cannot find xxx/go1.4/bin/go.
Set $GOROOT_BOOTSTRAP to a working Go tree >= Go 1.4.
```
Go 1.10 之后,不再需要配置该环境变量,能够自动找到,对新手越来越友好了!安装过程的日志输出简单很多
```
Building Go cmd/dist using /usr/local/go1.9.
Building Go toolchain1 using /usr/local/go1.9.
Building Go bootstrap cmd/go (go_bootstrap) using Go toolchain1.
Building Go toolchain2 using go_bootstrap and Go toolchain1.
Building Go toolchain3 using go_bootstrap and Go toolchain2.
Building packages and commands for linux/amd64.
```
有疑问加站长微信联系(非本文作者)