# 下载
wget https://storage.googleapis.com/golang/go1.14.4.linux-amd64.tar.gz
# 解压
tar -C /usr/local -xzf go1.10.1.linux-amd64.tar.gz
# 添加路径
vim ~/.bashrc
export GOROOT=/usr/local/go
export GOPATH=/home/yeyangfengqi/workspace
export GOBIN=$GOPATH/bin
export PATH=$GOPATH:$GOBIN:$GOROOT:$PATH
# 更新环境
source ~/.bashrc
# 验证
go env
有疑问加站长微信联系(非本文作者)