Running sudo apt-get install golang-stable
, I get Go version go1.0.3
. Is there any way to install go1.1.1
?
- Download say,
go1.6beta1.linux-amd64.tar.gz
from https://golang.org/dl/ into/tmp
wget https://storage.googleapis.com/golang/go1.6beta1.linux-amd64.tar.gz -o /tmp/go1.6beta1.linux-amd64.tar.gz
- un-tar into
/usr/local/bin
sudo tar -zxvf go1.6beta1.linux-amd64.tar.gz -C /usr/local/bin/
- Set GOROOT, GOPATH, [on ubuntu add following to ~/.bashrc]
mkdir ~/go
export GOPATH=~/go
export PATH=$PATH:$GOPATH/bin
export GOROOT=/usr/local/bin/go
export PATH=$PATH:$GOROOT/bin
- Verify
go version
should show be
go version go1.6beta1 linux/amd64
go env
should show be
GOARCH="amd64" GOBIN="" GOEXE="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOOS="linux" GOPATH="/home/vats/go" GORACE="" GOROOT="/usr/local/bin/go" GOTOOLDIR="/usr/local/bin/go/pkg/tool/linux_amd64" GO15VENDOREXPERIMENT="1" CC="gcc" GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0" CXX="g++" CGO_ENABLED="1"