Ubuntu 16.04 安装Go 1.9.2
系统环境
Ubuntu: 16.04
Go: 1.9.2
安装步骤
$ curl -O https://storage.googleapis.com/golang/go1.9.linux-amd64.tar.gz $ tar -C /usr/local -zxvf go1.9.linux-amd64.tar.gz $ mkdir -p ~/go/src $ echo "export GOPATH=$HOME/go" >> ~/.bashrc $ echo "export PATH=$PATH:$GOPATH/bin:/usr/local/go/bin" >> ~/.bashrc $ source ~/.bashrc $ go version
注意:安装完毕后,go的系统库存放于/usr/local/go/bin;后续工程中自动下载的库存放于$HOME/go/bin下