Skip to content

Instantly share code, notes, and snippets.

@jmcarbo
Last active April 12, 2016 14:10
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jmcarbo/5ce3dc616578775d1bce to your computer and use it in GitHub Desktop.
Save jmcarbo/5ce3dc616578775d1bce to your computer and use it in GitHub Desktop.
Install golang
sudo apt-get update -y && sudo apt-get install -y -q curl build-essential ca-certificates git mercurial bzr
sudo mkdir -p /goroot && sudo chown -R `whoami` /goroot && curl https://storage.googleapis.com/golang/go1.4.1.linux-amd64.tar.gz | tar xvzf - -C /goroot --strip-components=1
sudo mkdir -p /gopath && sudo chown -R `whoami` /gopath
export GOROOT=/goroot
export GOPATH=/gopath
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
echo "export GOROOT=/goroot" >> ~/.profile
echo "export GOPATH=/gopath" >> ~/.profile
echo "export PATH=$PATH:$GOROOT/bin:$GOPATH/bin" >> ~/.profile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment