2014-07-28

Installing Go 1.3+ on Ubuntu via GVM (Go Version Manager)

Sometimes on some Linux distribution, the Go package are out of date, for example:

apt-cache show golang | grep Version
Version: 2:1.2.1-2ubuntu1

and we look for the PPA (user repository) but failed to see the latest version!
One solution that we could use is using GVM that could be installed using this command:

# install dependencies
sudo apt-get install curl git mercurial make binutils bison gcc

# install gvm
bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer)

# use gvm (or relogin/restart bash, since it's inserted into .bashrc)
source ~/.gvm/scripts/gvm

to see the list of available version, we could use:

gvm listall

to install Go 1.3, we could use this command:

gvm install go1.3
Installing go1.3...
 * Compiling...

Voila, done! now we could use it using this command:

gvm use go1.3
Now using version go1.3
go version
go version go1.3 linux/amd64


3 comments :

  1. Thanks...! do you know how can I configure liteIde with gvm?

    ReplyDelete
    Replies
    1. I believe, setting the correct PATH environment variables would be work just fine. See here https://github.com/visualfc/liteide/blob/master/liteidex/deploy/welcome/en/guide.md for the guide to set the variables specific on LiteIDE.

      Delete

THINK: is it True? is it Helpful? is it Inspiring? is it Necessary? is it Kind?