vi /etc/profile
尾部添加
export GOROOT=/go
export GOBIN=$GOROOT/bin
export GOPATH=/root/GoProject
export PATH=$PATH:$GOBIN:$GOPATH
vi /etc/profile
尾部添加
export GOROOT=/go
export GOBIN=$GOROOT/bin
export GOPATH=/root/GoProject
export PATH=$PATH:$GOBIN:$GOPATH
转载于:https://my.oschina.net/lengxugz/blog/600406