Installing Google Go in Steps

The following packages are required for installing Google Go : bison, make, gcc, libc6-dev, ed, mercurial. To install run the command
sudoapt-getinstallbisonmakegcclibc6-devedmercurial

Edit the .bashrc file to set up the environment variables, .bashrc file resides in your home folder (/home/username/). Add the following lines if you are using ubuntu x86 (or unsure)
export GOROOT=$HOME/go
export GOARCH=386
export GOOS=linux
export GOBIN=$HOME/gobin
export PATH=$PATH:$GOBIN

If you are using 64bit ubuntu version append the following lines instead