Michael Doornbos

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 https://go.googlecode.com/hg/ $GOROOT









cd $GOROOT/src



./all.bash

That’s it.

<< Previous Post

|

Next Post >>