Running sudo apt-get install golang-stable
, I get Go version go1.0.3
. Is there any way to install go1.1.1
?
转载于:https://stackoverflow.com/questions/17480044/how-to-install-the-current-version-of-go-in-ubuntu-precise
Running sudo apt-get install golang-stable
, I get Go version go1.0.3
. Is there any way to install go1.1.1
?
转载于:https://stackoverflow.com/questions/17480044/how-to-install-the-current-version-of-go-in-ubuntu-precise
I found a repo that has the latest versions: https://launchpad.net/~duh/+archive/golang/+packages. So basically do:
sudo apt-get install python-software-properties # 12.04
sudo add-apt-repository ppa:duh/golang
sudo apt-get update
sudo apt-get install golang
To confirm:
go version
which outputs in my case (Ubuntu precise)
go version go1.1.1 linux/amd64
From there just export the settings you're gonna need to bash_rc or equivalent:
export GOROOT=/usr/lib/go
export GOBIN=/usr/bin/go