GOPATH 环境变量是 Go 查询代码的位置,值是分号分隔的字符串。 GOROOT 是 Go 二进制的路径。 export GOROOT=$HOME/go export PATH=$PATH:$GOROOT/bin