Ubuntu 18.04安装golang

sudo apt-get install golang-go

然后将下列代码追加到~/.bashrc文件末尾

export GOPATH=$HOME/go
export GOROOT=/usr/lib/go
export PATH=$PATH:$GOPATH/bin
export PATH=$PATH:$GOROOT/bin

 

你可能感兴趣的:(Ubuntu 18.04安装golang)