golang
The golang
Debian package may have already made its way into your Ubuntu distribution. Try this:
sudo add-apt-repository ppa:ubuntu-lxc/lxd-stable sudo apt-get update sudo apt-get install golang
Note there is golang in Ubuntu but it is not up to date. An up-to-date version may be found at https://launchpad.net/~ubuntu-lxc/+archive/ubuntu/lxd-stable
That is all you need to get go
working on your system. (You can use go env GOROOT
to be sure where the Go files are, if you‘re curious.) Don’t forget to create your GOPATH.
See http://blog.labix.org/2013/06/15/in-flight-deb-packages-of-go
Using the GVM for installation and compile natively.
http://www.hostingadvice.com/how-to/install-golang-on-ubuntu/
sudo apt-get remove golang-go
sudo apt-get remove --auto-remove golang-go
sudo apt-get purge golang-go
or sudo apt-get purge --auto-remove golang-go
I recommend to check out this note.
wget https://storage.googleapis.com/golang/go1.7.1.linux-amd64.tar.gz
sudo tar -zxvf go1.7.1.linux-amd64.tar.gz -C /usr/local/
echo 'export GOROOT=/usr/local/go' >> ~/.bashrc
echo 'export GOPATH=$HOME/go' >> ~/.bashrc
echo 'export PATH=$PATH:$GOROOT/bin:$GOPATH/bin' >> ~/.bashrc