Installing Google Go on Ubuntu 9.10 x86

This is for x86 processors.  You need to change the 386 to amd64 if that’s your chip architecture.
First create a bin directory in your home directory if you don’t have one already:

mkdir $HOME/bin

Then edit your .bashrc file and add:

export GOROOT=$HOME/go
export GOOS=linux
export GOARCH=386
export PATH=$PATH:$HOME/bin

Then reread your bashrc file:

source .bashrc

You’ll need some packages installed to build it:

sudo apt-get install bison gcc libc6-dev mercurial

Now check out the code and build it:

hg clone -r release $GOROOT
cd $GOROOT/src

That’s it.


%d bloggers like this: