06-13-2016, 03:29 PM
Nice to be proved wrong
That creates a go compiler in /usr/bin. It's version 1.6.1 of Go. The latest stable release is 1.6.2, but 1.6.1 is perfectly serviceable.
So umiddelb is right, you can install go much more easily than I described. If you just want to write Go programs, that's obviously the way to go.
However, if you want the latest stable release, or a beta test version, you will have to compile it from source, and I'm not sure that you can use a version installed via apt to do that. I just tried it and the builder script failed looking for yet another version of go - version 1.4. I then tried setting GOROOT_BOOTSTRAP to /usr (so that it would use /usr/bin/go to compile) but that failed in a different way.
I think that the instructions for compiling Go from source assume that you are using another compiler compiled from source, which is why you have to mess about with a cross-compiler to get started. If anybody knows better, please say.
That creates a go compiler in /usr/bin. It's version 1.6.1 of Go. The latest stable release is 1.6.2, but 1.6.1 is perfectly serviceable.
So umiddelb is right, you can install go much more easily than I described. If you just want to write Go programs, that's obviously the way to go.
However, if you want the latest stable release, or a beta test version, you will have to compile it from source, and I'm not sure that you can use a version installed via apt to do that. I just tried it and the builder script failed looking for yet another version of go - version 1.4. I then tried setting GOROOT_BOOTSTRAP to /usr (so that it would use /usr/bin/go to compile) but that failed in a different way.
I think that the instructions for compiling Go from source assume that you are using another compiler compiled from source, which is why you have to mess about with a cross-compiler to get started. If anybody knows better, please say.