+
95
-

go run出现GOCACHE is not defined and neither

go

build cache is required, but could not be located: GOCACHE is not defined and neither $XDG_CACHE_HOME nor $HOME are defined

今天执行go run 代码出现以上错误,请问怎么解决?

网友回复

+
15
-

环境变量gocache没有设置,设置一下

export GOCACHE=''/tmp'

我知道答案,我要回答