"Let us see how you can do this. I did it on ubuntu 9.04.
"1) Install Pre-requisites on ubuntu.
"You need gcc and some supporting software like bison to compile go. Install the following.
$ sudo apt-get install bison gcc libc6-dev ed.
"The go repository uses mercurial version controls system .
Install mercurial with the following command.
$ apt-get install mercurial
"2 Set up the environment variables."