Installing Go 1.1 on Ubuntu

Installing Go 1.1 on Ubuntu

Most recently I started playing around with Go. However, the packages that I wanted to use were all built for the newest version of Go, version 1.1+ and the Ubuntu packages were still stuck in v1.0 land, which proved incredibly frustrating. So, I gave up, uninstalled the default package and compiled Go from source. It’s incredibly easy, but I’ll walk you through it anyway.

Dependencies

 Building from source

You should receive a message back that reads something like this:

ALL TESTS PASSED


Installed Go for linux/amd64 in /usr/local/go
Installed commands in /usr/local/go/bin

And, running go version should return something like this

Preparing Go GET

Golang comes preinstalled with a package manager. All you need to do to make it work is create a directory to store your packages, and configure the GOPATH.

Then you can install something to test it

Permanently configure your env variables

Now all accounts will be able to share in the Go experience, and you wont need to reconfigure the variables each time you boot up/login.

 

Dave

About David Parlevliet

Dave is long time developer with a passion toward teaching. He divides his time between his wife, her cat and his projects. He recently started using twitter so make sure to follow him!