Skip to content

Rebuilding reinstalling upgrading Go

Louis Maddox edited this page Jan 7, 2018 · 3 revisions
  • My Go source is in ~/.go, moved to ~/.go1.4 to make room for 1.5
  • export GOROOT_BOOTSTRAP="/usr/local/go1.4" so all.bash knows where the Go it's building with is
/usr/local/go/src $ ./all.bash

1.6 ⇢ 1.9

  • firstly get the location of Go (which go/usr/local/go/bin/go)

  • as outlined here, remove the existing Go (or if you like, keep it for posterity, or in case you need to roll back)

    sudo mv /usr/local/go/ /usr/local/go1.6/

  • download the latest binary from golang.org

  • sudo tar -C /usr/local -xzf Downloads/go1.9.2.linux-amd64.tar.gz

  • to confirm, run go versiongo version go1.9.2 linux/amd64

Clone this wiki locally