Installation of latest version of Go Lang on Ubuntu
Published on 05.09.2015
Installing Go on Ubuntu is pretty easy. We can do that with apt-get manager but i preffer to do it with downloading from official site.
Last version of the time of writing this is 1.5. So we can download it from
https://golang.org/dl/
curl -O https://storage.googleapis.com/golang/go1.5.linux-amd64.tar.gzAfter that we must unpack it into
/usr/local
tar -C /usr/local -xzf go1.5.linux-amd64.tar.gz
After that we must set some
env
variables. mkdir -p ~/go; echo "export GOPATH=$HOME/go" >> ~/.bashrc echo "export PATH=$PATH:$HOME/go/bin:/usr/local/go/bin" >> ~/.bashrc source ~/.bashrcAnd finally we have it:
root@golang:~# go version go version go1.5 linux/amd64