-
version: I have running coder-server with this
The HOME=/root
GOCACHE=$HOME/.cache/go-build But I still got error like this go.toolsGopath setting is not set. Using GOPATH /root/go
Installing 16 tools at /root/go/bin in module mode.
gocode
gopkgs
go-outline
go-symbols
guru
gorename
gotests
gomodifytags
impl
fillstruct
goplay
godoctor
gocode-gomod
godef
goreturns
golint
Installing github.com/mdempsky/gocode FAILED
Installing github.com/uudashr/gopkgs/v2/cmd/gopkgs FAILED
Installing github.com/ramya-rao-a/go-outline FAILED
Installing github.com/acroca/go-symbols FAILED
Installing golang.org/x/tools/cmd/guru FAILED
Installing golang.org/x/tools/cmd/gorename FAILED
Installing github.com/cweill/gotests/... FAILED
Installing github.com/fatih/gomodifytags FAILED
Installing github.com/josharian/impl FAILED
Installing github.com/davidrjenni/reftools/cmd/fillstruct FAILED
Installing github.com/haya14busa/goplay/cmd/goplay FAILED
Installing github.com/godoctor/godoctor FAILED
Installing github.com/stamblerre/gocode FAILED
Installing github.com/rogpeppe/godef FAILED
Installing github.com/sqs/goreturns FAILED
Installing golang.org/x/lint/golint FAILED
16 tools failed to install.
gocode:
Error: Command failed: /usr/bin/go get -v github.com/mdempsky/gocode
build cache is required, but could not be located: GOCACHE is not defined and neither $XDG_CACHE_HOME nor $HOME are defined
build cache is required, but could not be located: GOCACHE is not defined and neither $XDG_CACHE_HOME nor $HOME are defined
gopkgs:
Error: Command failed: /usr/bin/go get -v github.com/uudashr/gopkgs/v2/cmd/gopkgs
build cache is required, but could not be located: GOCACHE is not defined and neither $XDG_CACHE_HOME nor $HOME are defined
build cache is required, but could not be located: GOCACHE is not defined and neither $XDG_CACHE_HOME nor $HOME are defined
go-outline:
Error: Command failed: /usr/bin/go get -v github.com/ramya-rao-a/go-outline
build cache is required, but could not be located: GOCACHE is not defined and neither $XDG_CACHE_HOME nor $HOME are defined
build cache is required, but could not be located: GOCACHE is not defined and neither $XDG_CACHE_HOME nor $HOME are defined
go-symbols:
Error: Command failed: /usr/bin/go get -v github.com/acroca/go-symbols
build cache is required, but could not be located: GOCACHE is not defined and neither $XDG_CACHE_HOME nor $HOME are defined
build cache is required, but could not be located: GOCACHE is not defined and neither $XDG_CACHE_HOME nor $HOME are defined
guru:
Error: Command failed: /usr/bin/go get -v golang.org/x/tools/cmd/guru
build cache is required, but could not be located: GOCACHE is not defined and neither $XDG_CACHE_HOME nor $HOME are defined
build cache is required, but could not be located: GOCACHE is not defined and neither $XDG_CACHE_HOME nor $HOME are defined
gorename:
Error: Command failed: /usr/bin/go get -v golang.org/x/tools/cmd/gorename
build cache is required, but could not be located: GOCACHE is not defined and neither $XDG_CACHE_HOME nor $HOME are defined
build cache is required, but could not be located: GOCACHE is not defined and neither $XDG_CACHE_HOME nor $HOME are defined
gotests:
Error: Command failed: /usr/bin/go get -v github.com/cweill/gotests/...
build cache is required, but could not be located: GOCACHE is not defined and neither $XDG_CACHE_HOME nor $HOME are defined
build cache is required, but could not be located: GOCACHE is not defined and neither $XDG_CACHE_HOME nor $HOME are defined
gomodifytags:
Error: Command failed: /usr/bin/go get -v github.com/fatih/gomodifytags
build cache is required, but could not be located: GOCACHE is not defined and neither $XDG_CACHE_HOME nor $HOME are defined
build cache is required, but could not be located: GOCACHE is not defined and neither $XDG_CACHE_HOME nor $HOME are defined
impl:
Error: Command failed: /usr/bin/go get -v github.com/josharian/impl
build cache is required, but could not be located: GOCACHE is not defined and neither $XDG_CACHE_HOME nor $HOME are defined
build cache is required, but could not be located: GOCACHE is not defined and neither $XDG_CACHE_HOME nor $HOME are defined
fillstruct:
Error: Command failed: /usr/bin/go get -v github.com/davidrjenni/reftools/cmd/fillstruct
build cache is required, but could not be located: GOCACHE is not defined and neither $XDG_CACHE_HOME nor $HOME are defined
build cache is required, but could not be located: GOCACHE is not defined and neither $XDG_CACHE_HOME nor $HOME are defined
goplay:
Error: Command failed: /usr/bin/go get -v github.com/haya14busa/goplay/cmd/goplay
build cache is required, but could not be located: GOCACHE is not defined and neither $XDG_CACHE_HOME nor $HOME are defined
build cache is required, but could not be located: GOCACHE is not defined and neither $XDG_CACHE_HOME nor $HOME are defined
godoctor:
Error: Command failed: /usr/bin/go get -v github.com/godoctor/godoctor
build cache is required, but could not be located: GOCACHE is not defined and neither $XDG_CACHE_HOME nor $HOME are defined
build cache is required, but could not be located: GOCACHE is not defined and neither $XDG_CACHE_HOME nor $HOME are defined
gocode-gomod:
Error: Command failed: /usr/bin/go get -v -d github.com/stamblerre/gocode
build cache is required, but could not be located: GOCACHE is not defined and neither $XDG_CACHE_HOME nor $HOME are defined
build cache is required, but could not be located: GOCACHE is not defined and neither $XDG_CACHE_HOME nor $HOME are defined
godef:
Error: Command failed: /usr/bin/go get -v github.com/rogpeppe/godef
build cache is required, but could not be located: GOCACHE is not defined and neither $XDG_CACHE_HOME nor $HOME are defined
build cache is required, but could not be located: GOCACHE is not defined and neither $XDG_CACHE_HOME nor $HOME are defined
goreturns:
Error: Command failed: /usr/bin/go get -v github.com/sqs/goreturns
build cache is required, but could not be located: GOCACHE is not defined and neither $XDG_CACHE_HOME nor $HOME are defined
build cache is required, but could not be located: GOCACHE is not defined and neither $XDG_CACHE_HOME nor $HOME are defined
golint:
Error: Command failed: /usr/bin/go get -v golang.org/x/lint/golint
build cache is required, but could not be located: GOCACHE is not defined and neither $XDG_CACHE_HOME nor $HOME are defined
build cache is required, but could not be located: GOCACHE is not defined and neither $XDG_CACHE_HOME nor $HOME are defined How to figure this out? Thanks |
Beta Was this translation helpful? Give feedback.
Answered by
cospotato
Mar 21, 2020
Replies: 2 comments 3 replies
-
Fixed with full env file LANG=zh_CN.UTF-8
LC_CTYPE=zh_CN.UTF-8
USER=root
LOGNAME=root
HOME=/root
PATH=/root/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin
SHELL=/bin/zsh
TERM=xterm-256color
XDG_SESSION_ID=27
XDG_RUNTIME_DIR=/run/user/0
ZSH=/root/.oh-my-zsh
GOPATH=/root/go Full
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
code-asher
-
Thanks for this! Very helpful |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Fixed with full env file
Full
code-server.service