How to install go 1.8 on Ubuntu 16.04
If install golang in Ubuntu 16.04 throught synaptic, you will install version 1.6 and maybe you will see the following problems:
cannot find package "golang.org/x/sync/errgroup" in any of:
/usr/lib/go-1.6/src/golang.org/x/sync/errgroup (from $GOROOT)
/src/golang.org/x/sync/errgroup (from $GOPATH)
exit status 1
exit status 1
To avoid it, is better install it from the source:
wget https://storage.googleapis.com/golang/go1.8.linux-amd64.tar.gz
sudo tar -zxvf go1.8.linux-amd64.tar.gz -C /usr/local/
mkdir ~/go
echo 'export GOROOT=/usr/local/go' >> ~/.bashrc
echo 'export GOPATH=$HOME/go' >> ~/.bashrc
echo 'export PATH=$PATH:$GOROOT/bin:$GOPATH/bin' >> ~/.bashrc
source ~/.bashrc
Enjoy it!
cannot find package "golang.org/x/sync/errgroup" in any of:
/usr/lib/go-1.6/src/golang.org/x/sync/errgroup (from $GOROOT)
/src/golang.org/x/sync/errgroup (from $GOPATH)
exit status 1
exit status 1
To avoid it, is better install it from the source:
wget https://storage.googleapis.com/golang/go1.8.linux-amd64.tar.gz
sudo tar -zxvf go1.8.linux-amd64.tar.gz -C /usr/local/
mkdir ~/go
echo 'export GOROOT=/usr/local/go' >> ~/.bashrc
echo 'export GOPATH=$HOME/go' >> ~/.bashrc
echo 'export PATH=$PATH:$GOROOT/bin:$GOPATH/bin' >> ~/.bashrc
source ~/.bashrc
Enjoy it!
Comments
Post a Comment