Now I had a headache installing golang as using via apt-get in wheezy installed an old version which wasn’t compatible with the software I wanted to install. Luckily I manged to stumble upon a tool called Go Version Manager (gvm) installed under the root user so modify to meet your needs.
apt-get install bison
bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer )
Edit bash rc and add some varibles (these were autmatically added to mine)
nano /root/.bashrc
add [[ -s "/root/.gvm/scripts/gvm" ]] && source "/root/.gvm/scripts/gvm"
save and exit
reload .bashrc
source ~/.bashrc
gvm version
Go Version Manager v1.0.22 installed at /root/.gvm
gvm listall
gvm gos (available)
go1
go1.0.1
go1.0.2
go1.0.3
go1.1
go1.1.1
go1.1.2
go1.1rc2
go1.1rc3
go1.2
go1.2.1
go1.2.2
go1.2rc2
go1.2rc3
go1.2rc4
go1.2rc5
go1.3
go1.3.1
go1.3.2
go1.3.3
go1.3beta1
go1.3beta2
go1.3rc1
go1.3rc2
go1.4
go1.4.1
go1.4.2
go1.4beta1
go1.4rc1
go1.4rc2
release.r56
release.r57
release.r57.1
release.r57.2
release.r58
release.r58.1
release.r58.2
release.r59
release.r60
release.r60.1
release.r60.2
release.r60.3
gvm install go1.4
Downloading Go source… Installing go1.4… * Compiling… gvm
use go1.4
Now using version go1.4
go version
go version go1.4 linux/amd64