Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help Wanted!!! #42993

Closed
yuandongx opened this issue Dec 4, 2020 · 4 comments
Closed

Help Wanted!!! #42993

yuandongx opened this issue Dec 4, 2020 · 4 comments

Comments

@yuandongx
Copy link

yuandongx commented Dec 4, 2020

What version of Go are you using (go version)?

$ go version
C:\Users\goland>go version
go version go1.15.6 windows/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

go env Output
C:\Users\goland>go env
set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOCACHE=off
set GOENV=
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\Users\Administrator\go\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Users\Administrator\go
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=c:\go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=c:\go\pkg\tool\windows_amd64
set GCCGO=gccgo
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=C:\Users\ADMINI~1\AppData\Local\Temp\go-build153585106=/tmp/go-build -gno-record-gcc-switches

What did you do?

C:\Users\goland>go mod init mygo
build cache is required, but could not be located: GOCACHE is not defined and %L
ocalAppData% is not defined

What did you expect to see?

mod init

What did you see instead?

build cache is required, but could not be located: GOCACHE is not defined and %LocalAppData% is not defined

@ALTree
Copy link
Member

ALTree commented Dec 4, 2020

From your env: GOCACHE=off <-- this is the problem. Unset the GOCACHE variable to let Go use the cache, it's no longer optional.

@ALTree ALTree closed this as completed Dec 4, 2020
@yuandongx
Copy link
Author

yuandongx commented Dec 4, 2020

@ALTree
go env -u GOMODCACHE go env: cannot find go env config: %AppData% is not defined, A error happended!
Do you mean go env -u GOMODCACHE?

@yuandongx
Copy link
Author

yuandongx commented Dec 4, 2020

It seems that %AppData% is not found. What is %AppData%?How I can find it? Or Where it should be? Can you help me ? Tanks in advance. @ALTree

@ALTree
Copy link
Member

ALTree commented Dec 4, 2020

I think %AppData% is just a windows Environment Variable; I think Go uses that by default (if it's defined) and puts the cache there. What you can do is create a folder like C:\Users\goland\cache and then set GOCACHE to that path.

@golang golang locked and limited conversation to collaborators Dec 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants