Ubuntu更新golang

获取到golang 安装路径

终端输入 go env

go env

GOARCH="amd64"
GOBIN="/root/gopath/bin"
GOCACHE="/home/luo/.cache/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/gopath"
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build282656966=/tmp/go-build -gno-record-gcc-switches

然后到 https://studygolang.com/dl获取golang 最新的包,解压替换到 GOROOT下, 重启goland 就可以使用到最新的go 了

你可能感兴趣的:(GO)