Golang Installation in Ubuntu 13.10

Based on this instruction, not the cleanest package-based installation.

Install the necessary packages
$ sudo apt-get install golang bzr

Create and set the $GOPATH
$ mkdir $HOME/Project/go
$ export $GOPATH=$HOME/Projects/go

Obtain and install the godeb utility. Note that the tool is located in launchpad, hence the need of bzr version control in step 1.
$ go get launchpad.net/godeb

Test our installation of godeb.
$ $GOPATH/bin/godeb --help

Remove the existing old Golang binary of version 1.1.2.
$ sudo apt-get remove golang

List all available version and install the latest version
$ $GOPATH/bin/godeb list
$ sudo dpkg -i --force-overwrite go_1.2-godeb1_amd64.deb

No comments:

Post a Comment