Skip to content

Instantly share code, notes, and snippets.

@oguya
Created May 20, 2015 03:39
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oguya/83c1dd1bb13f00a3f87a to your computer and use it in GitHub Desktop.
Save oguya/83c1dd1bb13f00a3f87a to your computer and use it in GitHub Desktop.
install go to a custom location
  • download & install go in your home dir

      mkdir ~/src
      wget "https://storage.googleapis.com/golang/go1.4.2.linux-amd64.tar.gz"
      tar -xvf go1.4.2.linux-amd64.tar.gz
      export GOROOT="$HOME/src/go"
      export PATH="$PATH:$GOROOT/bin"
    
  • create a directory where go would download & install packages using go get

      mkdir ~/src/GoPackages/
      export GOPATH="~/src/GoPackages/"
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment