go环境变量全部消失了
Closed this issue · 1 comments
Describe the bug/缺陷描述
我使用g install下载1.20和1.21.0这两个版本后,我的所有go env $变量全部都消失了,只能通过go env看到环境变量
To Reproduce/缺陷复现步骤
Steps to reproduce the behavior:
- g ls-remote
- g install 1.20
- g install 1.21.0
- source "$HOME/.g/env"
- go env $GOROOT
Expected behavior/期望行为
A clear and concise description of what you expected to happen.
Screenshots/实际运行结果截图
If applicable, add screenshots to help explain your problem.
Environments (please complete the following information)/运行环境:
-
OS [e.g. uname -a]
Linux cobbler-test 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux -
g --version
g --version
g version 1.5.2
build: 2023-09-05T21:47:23+08:00
branch: release/1.5.2
commit: dd615e5
- go env
go env
GO111MODULE='auto'
GOARCH='amd64'
GOBIN=''
GOCACHE='/root/.cache/go-build'
GOENV='/root/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/home/root/sdk/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/home/root/sdk/go'
GOPRIVATE=''
GOPROXY='https://goproxy.cn,direct'
GOROOT='/root/.g/go'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/root/.g/go/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.21.0'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='1'
GOMOD=''
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build1163871522=/tmp/go-build -gno-record-gcc-switches'
Additional context/额外信息
Add any other context about the problem here.
go env命令写错了