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

installation: install go tools failed due to go modules in WSL 2 #510

Closed
cikupin opened this issue Aug 12, 2020 · 2 comments
Closed

installation: install go tools failed due to go modules in WSL 2 #510

cikupin opened this issue Aug 12, 2020 · 2 comments
Labels
FrozenDueToAge tools/installation upstream-go Issues that are caused by bugs in the Go toolchain. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.

Comments

@cikupin
Copy link

cikupin commented Aug 12, 2020

What version of Go, VS Code & VS Code Go extension are you using?

  • Run go version to get version of Go
    • go1.14.7 linux/amd64
  • Run code -v or code-insiders -v to get version of VS Code or VS Code Insiders
    • 1.47.3
      91899dcef7b8110878ea59626991a18c8a6a1b3e
      x64
  • Check your installed extensions to get the version of the VS Code Go extension
    • 0.16.1 (installed on ubuntu 20.04 WSL)
  • Run go env to get the go development environment details
    • GO111MODULE=""
      GOARCH="amd64"
      GOBIN=""
      GOCACHE="/home/cikupin/.cache/go-build"
      GOENV="/home/cikupin/.config/go/env"
      GOEXE=""
      GOFLAGS=""
      GOHOSTARCH="amd64"
      GOHOSTOS="linux"
      GOINSECURE=""
      GONOPROXY=""
      GONOSUMDB=""
      GOOS="linux"
      GOPATH="/home/cikupin/go"
      GOPRIVATE=""
      GOPROXY="https://proxy.golang.org,direct"
      GOROOT="/home/cikupin/Apps/go1.14"
      GOSUMDB="sum.golang.org"
      GOTMPDIR=""
      GOTOOLDIR="/home/cikupin/Apps/go1.14/pkg/tool/linux_amd64"
      GCCGO="gccgo"
      AR="ar"
      CC="gcc"
      CXX="g++"
      CGO_ENABLED="1"
      GOMOD=""
      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-build961588625=/tmp/go-build -gno-record-gcc-switches"

Share the Go related settings you have added/edited

Remote WSL setting

{
    "remote.WSL.debug": false,
    "editor.minimap.enabled": false,
    "go.autocompleteUnimportedPackages": true,
    "go.gopath": "/home/cikupin/go",
    "go.goroot": "/home/cikupin/Apps/go1.14",
    "editor.wordWrap": "on"
}

Describe the bug

I cannot install go tools using WSL as well as install dependecies using go modules.

Steps to reproduce the behavior:

  1. Press ctrl + shift + p
  2. Select Go: Install/Update Tools
  3. Select tools to be installed
  4. Then install tools failed

Screenshots or recordings

Tools environment: GOPATH=/home/cikupin/go
Installing 17 tools at /home/cikupin/go/bin in module mode.
  gocode
  gopkgs
  go-outline
  go-symbols
  guru
  gorename
  gotests
  gomodifytags
  impl
  fillstruct
  goplay
  godoctor
  dlv
  gocode-gomod
  godef
  goimports
  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/go-delve/delve/cmd/dlv FAILED
Installing github.com/stamblerre/gocode FAILED
Installing github.com/rogpeppe/godef FAILED
Installing golang.org/x/tools/cmd/goimports FAILED
Installing golang.org/x/lint/golint FAILED

17 tools failed to install.

gocode: failed to install [object Object]: Error: Command failed: /home/cikupin/Apps/go1.14/bin/go get -v github.com/mdempsky/gocode
go get github.com/mdempsky/gocode: rename /home/cikupin/go/pkg/mod/github.com/mdempsky/[email protected] /home/cikupin/go/pkg/mod/github.com/mdempsky/[email protected]: permission denied
 undefined  
gopkgs: failed to install [object Object]: Error: Command failed: /home/cikupin/Apps/go1.14/bin/go get -v github.com/uudashr/gopkgs/v2/cmd/gopkgs
go get github.com/uudashr/gopkgs/v2/cmd/gopkgs: rename /home/cikupin/go/pkg/mod/github.com/uudashr/gopkgs/[email protected] /home/cikupin/go/pkg/mod/github.com/uudashr/gopkgs/[email protected]: permission denied
 undefined  
go-outline: failed to install [object Object]: Error: Command failed: /home/cikupin/Apps/go1.14/bin/go get -v github.com/ramya-rao-a/go-outline
go get github.com/ramya-rao-a/go-outline: rename /home/cikupin/go/pkg/mod/github.com/ramya-rao-a/[email protected] /home/cikupin/go/pkg/mod/github.com/ramya-rao-a/[email protected]: permission denied
 undefined  
go-symbols: failed to install [object Object]: Error: Command failed: /home/cikupin/Apps/go1.14/bin/go get -v github.com/acroca/go-symbols
go: downloading github.com/acroca/go-symbols v0.1.1
go get github.com/acroca/go-symbols: rename /home/cikupin/go/pkg/mod/github.com/acroca/[email protected] /home/cikupin/go/pkg/mod/github.com/acroca/[email protected]: permission denied
 undefined  
guru: failed to install [object Object]: Error: Command failed: /home/cikupin/Apps/go1.14/bin/go get -v golang.org/x/tools/cmd/guru
go get golang.org/x/tools/cmd/guru: rename /home/cikupin/go/pkg/mod/golang.org/x/[email protected] /home/cikupin/go/pkg/mod/golang.org/x/[email protected]: permission denied
 undefined  
gorename: failed to install [object Object]: Error: Command failed: /home/cikupin/Apps/go1.14/bin/go get -v golang.org/x/tools/cmd/gorename
go get golang.org/x/tools/cmd/gorename: rename /home/cikupin/go/pkg/mod/golang.org/x/[email protected] /home/cikupin/go/pkg/mod/golang.org/x/[email protected]: permission denied
 undefined  
gotests: failed to install [object Object]: Error: Command failed: /home/cikupin/Apps/go1.14/bin/go get -v github.com/cweill/gotests/...
go: downloading github.com/cweill/gotests v1.5.3
go get github.com/cweill/gotests/...: rename /home/cikupin/go/pkg/mod/github.com/cweill/[email protected] /home/cikupin/go/pkg/mod/github.com/cweill/[email protected]: permission denied
 undefined  
gomodifytags: failed to install [object Object]: Error: Command failed: /home/cikupin/Apps/go1.14/bin/go get -v github.com/fatih/gomodifytags
go: downloading github.com/fatih/gomodifytags v1.6.0
go get github.com/fatih/gomodifytags: rename /home/cikupin/go/pkg/mod/github.com/fatih/[email protected] /home/cikupin/go/pkg/mod/github.com/fatih/[email protected]: permission denied
 undefined  
impl: failed to install [object Object]: Error: Command failed: /home/cikupin/Apps/go1.14/bin/go get -v github.com/josharian/impl
go: downloading github.com/josharian/impl v1.0.0
go get github.com/josharian/impl: rename /home/cikupin/go/pkg/mod/github.com/josharian/[email protected] /home/cikupin/go/pkg/mod/github.com/josharian/[email protected]: permission denied
 undefined  
fillstruct: failed to install [object Object]: Error: Command failed: /home/cikupin/Apps/go1.14/bin/go get -v github.com/davidrjenni/reftools/cmd/fillstruct
go: downloading github.com/davidrjenni/reftools v0.0.0-20191222082827-65925cf01315
go get github.com/davidrjenni/reftools/cmd/fillstruct: rename /home/cikupin/go/pkg/mod/github.com/davidrjenni/[email protected] /home/cikupin/go/pkg/mod/github.com/davidrjenni/[email protected]: permission denied
 undefined  
goplay: failed to install [object Object]: Error: Command failed: /home/cikupin/Apps/go1.14/bin/go get -v github.com/haya14busa/goplay/cmd/goplay
go: downloading github.com/haya14busa/goplay v1.0.0
go get github.com/haya14busa/goplay/cmd/goplay: rename /home/cikupin/go/pkg/mod/github.com/haya14busa/[email protected] /home/cikupin/go/pkg/mod/github.com/haya14busa/[email protected]: permission denied
 undefined  
godoctor: failed to install [object Object]: Error: Command failed: /home/cikupin/Apps/go1.14/bin/go get -v github.com/godoctor/godoctor
go: downloading github.com/godoctor/godoctor v0.0.0-20200702010311-8433dcb3dc61
go get github.com/godoctor/godoctor: rename /home/cikupin/go/pkg/mod/github.com/godoctor/[email protected] /home/cikupin/go/pkg/mod/github.com/godoctor/[email protected]: permission denied
 undefined  
dlv: failed to install [object Object]: Error: Command failed: /home/cikupin/Apps/go1.14/bin/go get -v github.com/go-delve/delve/cmd/dlv
go: downloading github.com/go-delve/delve v1.5.0
go get github.com/go-delve/delve/cmd/dlv: rename /home/cikupin/go/pkg/mod/github.com/go-delve/[email protected] /home/cikupin/go/pkg/mod/github.com/go-delve/[email protected]: permission denied
 undefined  
gocode-gomod: failed to install [object Object]: Error: Command failed: /home/cikupin/Apps/go1.14/bin/go get -v -d github.com/stamblerre/gocode
go get github.com/stamblerre/gocode: rename /home/cikupin/go/pkg/mod/github.com/stamblerre/[email protected] /home/cikupin/go/pkg/mod/github.com/stamblerre/[email protected]: permission denied
 undefined  
godef: failed to install [object Object]: Error: Command failed: /home/cikupin/Apps/go1.14/bin/go get -v github.com/rogpeppe/godef
go get github.com/rogpeppe/godef: rename /home/cikupin/go/pkg/mod/github.com/rogpeppe/[email protected] /home/cikupin/go/pkg/mod/github.com/rogpeppe/[email protected]: permission denied
 undefined  
goimports: failed to install [object Object]: Error: Command failed: /home/cikupin/Apps/go1.14/bin/go get -v golang.org/x/tools/cmd/goimports
go get golang.org/x/tools/cmd/goimports: rename /home/cikupin/go/pkg/mod/golang.org/x/[email protected] /home/cikupin/go/pkg/mod/golang.org/x/[email protected]: permission denied
 undefined  
golint: failed to install [object Object]: Error: Command failed: /home/cikupin/Apps/go1.14/bin/go get -v golang.org/x/lint/golint
go get golang.org/x/lint/golint: rename /home/cikupin/go/pkg/mod/golang.org/x/[email protected] /home/cikupin/go/pkg/mod/golang.org/x/[email protected]: permission denied
 undefined
@hyangah
Copy link
Contributor

hyangah commented Aug 12, 2020

@cikupin Were you able to install the tools manually? (e.g. GO111MODULE=on go get -v golang.org/x/tools/gopls@latest)

It looks like golang/go#36568. https://golang.org/doc/go1.15#tools "Module cache" section describes a workaround for that issue. Do you mind trying that?

@hyangah hyangah added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Aug 12, 2020
@hyangah hyangah added upstream-go Issues that are caused by bugs in the Go toolchain. Windows labels Sep 3, 2020
@hyangah hyangah changed the title Install go tools failed due to go modules in WSL 2 installation: install go tools failed due to go modules in WSL 2 Sep 3, 2020
@gopherbot
Copy link
Collaborator

Timed out in state WaitingForInfo. Closing.

(I am just a bot, though. Please speak up if this is a mistake or you have the requested information.)

@golang golang locked and limited conversation to collaborators Sep 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge tools/installation upstream-go Issues that are caused by bugs in the Go toolchain. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

3 participants