Skip to content

Instantly share code, notes, and snippets.

@mohae
Created September 15, 2015 14:34
Show Gist options
  • Select an option

  • Save mohae/7502c06676afead2d3ba to your computer and use it in GitHub Desktop.

Select an option

Save mohae/7502c06676afead2d3ba to your computer and use it in GitHub Desktop.
Installs Go 1.4.2 to expected GOROOT_BOOTSTRAP location so Go version >= 1.5 can be compiled from source
#!/bin/bash
# DO NOT RUN with SUDO; Go should be installed under the user not root. Using sudo will
# cause problems.
#
# Since Go 1.4 or higher is required to compile Go 1.5 or higher from source; this
# installs Go 1.4.2 to $HOME/go1.4; the expected location of an existing Go tool chain.
# If you install it to a different location, set the GOROOT_BOOSTRAP environment
# variable accordingly.
#
# For more information: https://golang.org/doc/install/source
wget https://storage.googleapis.com/golang/go1.4.2.linux-amd64.tar.gz -O /tmp/go.tar.gz
sudo tar -C $HOME/go1.4 -xzf /tmp/go.tar.gz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment