install the latest golang on ubuntu Mar

 You can install golang in ubuntu through apt-get, but it tends to be out of date by a few versions. Luckily, it's easy to install the latest version on any system.

Head to the golang download page: and grab the download link. Then back on the server run the following:

tar -xvzf go1.8.linux-amd64.tar.gz
sudo mv go /usr/local/go

Next, you just need to set up your envars:

export GOROOT=/usr/local/go
export GOPATH=~/go
export PATH=$GOPATH/bin:$GOROOT/bin:$PATH

# check that it installed correctly
go version
go env

That's it!

Bookmark and Share
blog comments powered by Disqus