Grant McWilliams

Tech Programming Installing Google's Go Compiler on Ubuntu 10.10 x86_64

Installing Google's Go Compiler on Ubuntu 10.10 x86_64

In case you've been living under a rock and having seen Google's announcement of Go here's a tip - it's designed by Ken Thompson. Ring any bells? He's the guy who along with Dennis Richie created this little thing called Unix (which virtually every one of the top 100 supercomputers in the world as well as at least half of the Smartphone market runs variants of) and another little thing call the C language. Yes, most every other language was either based on C or used parts of it. Even today Linux is written in C. Had Go just been yet another beta project from Google I wouldn't have paid attention but if Ken says there was a need for a new language then I'm going to take it serious.

Here's the link - golang.org. Since I've just started playing with it I can't tell you if it's any good or not. I also can't tell you whether it's worth learning or not since I don't know the answer to that yet. I will however, tell you that I'm going to play with it and depending on my thoughts I may or may not dedicate a sectin of this site to it. At first glance it looks like compiled Python. Anyway here's how to install it for x86_64 on Ubuntu 10.10.

 

I shamelessly stole this from JeremyMorgan.com and edited it to work for my setup. He got most of it from golang.org but edited it to work with his setup. I thank him for that. I would have thanked him on his website but you have to log in to comment and you have to have an account to log in. One word - Disqus.

Step 1: Set some variables, create a personal bin directory and install the pre-reqs.

export GOROOT=$HOME/go
export GOARCH=386
export GOOS=linux
export GOBIN=$HOME/bin
export PATH=$GOBIN:$PATH
mkdir ~/bin
sudo apt-get install python-setuptools python-dev
sudo apt-get install mercurial
sudo apt-get install bison gcc libc6-dev ed make

 

Step 2: Get Go and compile it

 

hg clone -r release https://go.googlecode.com/hg/ $GOROOT
cd $GOROOT/src
./all.bash
 

 

Now you're as far as I am so have fun. You'll probably want to start by checking out the docs on the golang site.
Tech Programming Installing Google's Go Compiler on Ubuntu 10.10 x86_64