i am trying to install go from source
i follow this steps
git clone https://go.googlesource.com/go
cd go
git checkout go1.6.1
cd src
./all.bash
now it gives me the error saying
##### 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.
any idea how can i fix this do i just need to set env variable or any other installation is needed ?
You need to have an installed Go version 1.4 or newer to build the recent Go releases. The build script defaults to some path but if it's not there you need to set GOROOT_BOOTSTRAP environment variable to point to a previous working Go installation.
Go is written in Go (starting from version 1.5) so you have to install Go1.4 first. Just get Go Version Manager and run:
$ gvm install go1.4
$ gvm use go1.4
$ export GOROOT_BOOTSTRAP=$GOROOT
Another approach is about to install gcc go frontend:
$ sudo apt-get install gccgo-5
$ sudo update-alternatives --set go /usr/bin/go-5
$ export GOROOT_BOOTSTRAP=/usr
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With