ENVIRONMENT
vagrant / virtualbox / ubuntu-trusty64
my Go version is 1.2.1 installed via apt-get install golang
I need and should have installed a more recent (1.3+) version (repo outdated)
Is it best to:
A - apt-get uninstall, re-install using more updated repo
B - try to upgrade existing Go to 1.3 or higher
C - ?
The typical approach I believe is to use the godeb
tool: https://github.com/niemeyer/godeb
I recommend uninstalling the version of Go that comes with Ubuntu (1.2.1, as you mentioned). Instead, follow the instructions on the Go install page.
Summary:
go1.4.2.linux-amd64.tar.gz
.sudo tar -C /usr/local -xzf go1.4.2.linux-amd64.tar.gz
$PATH
. So we'll modify your environment using the Ubuntu way:sudo echo "export PATH=\$PATH:/usr/local/go/bin" > /etc/profile.d/golang_bin.sh
go version
To install the latest version of Go programming language in all currently supported versions of Ubuntu, including Ubuntu 14.04, open the terminal and type:
sudo snap install go --classic --channel stable
This snap provides an assembler, compiler, linker, and compiled libraries for the Go programming language. There are other channels besides stable, but the stable channel is the latest version of Go programming language. The go snap package will be updated automatically when updates are available.