K9s: Can't install via go get command

Created on 22 Jul 2020  Â·  7Comments  Â·  Source: derailed/k9s






Describe the bug
It can't install via go get command. Installing without Go Module, it shows cannot find package ... please see the complete message below. Installing with Go Module, it shows case-insensitive import collision: "github.com/googleapis/gnostic/openapiv2" and "github.com/googleapis/gnostic/OpenAPIv2".

To Reproduce
Steps to reproduce the behavior:

  1. $ go get -u github.com/derailed/k9s

Expected behavior
Download the package successfully.

Screenshots
Without Go Module while installing
image

With Go Module while installing
image

Versions (please complete the following information):

  • GO version: go version go1.14.3 windows/amd64

Additional context
Complete Message

C:\Users\miles.AD1>go get -u github.com/derailed/k9s
D:\Go\gopath\src\github.com\derailed\k9s\cmd\root.go:17:2: cannot find package "k8s.io/klog" in any of:
        D:\Go\goroot\src\k8s.io\klog (from $GOROOT)
        D:\Go\gopath\src\k8s.io\klog (from $GOPATH)
package sigs.k8s.io/kustomize/pkg/ifc: cannot find package "sigs.k8s.io/kustomize/pkg/ifc" in any of:
        D:\Go\goroot\src\sigs.k8s.io\kustomize\pkg\ifc (from $GOROOT)
        D:\Go\gopath\src\sigs.k8s.io\kustomize\pkg\ifc (from $GOPATH)
package sigs.k8s.io/kustomize/pkg/types: cannot find package "sigs.k8s.io/kustomize/pkg/types" in any of:
        D:\Go\goroot\src\sigs.k8s.io\kustomize\pkg\types (from $GOROOT)
        D:\Go\gopath\src\sigs.k8s.io\kustomize\pkg\types (from $GOPATH)
package sigs.k8s.io/kustomize/pkg/gvk: cannot find package "sigs.k8s.io/kustomize/pkg/gvk" in any of:
        D:\Go\goroot\src\sigs.k8s.io\kustomize\pkg\gvk (from $GOROOT)
        D:\Go\gopath\src\sigs.k8s.io\kustomize\pkg\gvk (from $GOPATH)
package sigs.k8s.io/kustomize/pkg/resmap: cannot find package "sigs.k8s.io/kustomize/pkg/resmap" in any of:
        D:\Go\goroot\src\sigs.k8s.io\kustomize\pkg\resmap (from $GOROOT)
        D:\Go\gopath\src\sigs.k8s.io\kustomize\pkg\resmap (from $GOPATH)
package sigs.k8s.io/kustomize/pkg/transformers: cannot find package "sigs.k8s.io/kustomize/pkg/transformers" in any of:
        D:\Go\goroot\src\sigs.k8s.io\kustomize\pkg\transformers (from $GOROOT)
        D:\Go\gopath\src\sigs.k8s.io\kustomize\pkg\transformers (from $GOPATH)
package sigs.k8s.io/kustomize/pkg/resource: cannot find package "sigs.k8s.io/kustomize/pkg/resource" in any of:
        D:\Go\goroot\src\sigs.k8s.io\kustomize\pkg\resource (from $GOROOT)
        D:\Go\gopath\src\sigs.k8s.io\kustomize\pkg\resource (from $GOPATH)
package sigs.k8s.io/kustomize/pkg/factory: cannot find package "sigs.k8s.io/kustomize/pkg/factory" in any of:
        D:\Go\goroot\src\sigs.k8s.io\kustomize\pkg\factory (from $GOROOT)
        D:\Go\gopath\src\sigs.k8s.io\kustomize\pkg\factory (from $GOPATH)
package sigs.k8s.io/kustomize/pkg/commands/build: cannot find package "sigs.k8s.io/kustomize/pkg/commands/build" in any of:
        D:\Go\goroot\src\sigs.k8s.io\kustomize\pkg\commands\build (from $GOROOT)
        D:\Go\gopath\src\sigs.k8s.io\kustomize\pkg\commands\build (from $GOPATH)
package sigs.k8s.io/kustomize/pkg/fs: cannot find package "sigs.k8s.io/kustomize/pkg/fs" in any of:
        D:\Go\goroot\src\sigs.k8s.io\kustomize\pkg\fs (from $GOROOT)
        D:\Go\gopath\src\sigs.k8s.io\kustomize\pkg\fs (from $GOPATH)

Most helpful comment

@luckielordie @ygworldr @MilesLin - What is the output of the following command: go env and make sure GO111MODULE=on also try `go clean -modcache'.

Also can you guys share your scenarios of building k9s by hand vs using the binary releases? Tx!!

All 7 comments

Same thing here on Fedora 32. Do you need any more debugging info? If so, what commands should I run?

I am also seeing the same issue. $ go get -v -u github.com/derailed/k9s

here is a verbose output of the previous command

Any update on this? Having the exact same problem.

@luckielordie @ygworldr @MilesLin - What is the output of the following command: go env and make sure GO111MODULE=on also try `go clean -modcache'.

Also can you guys share your scenarios of building k9s by hand vs using the binary releases? Tx!!

Also can you guys share your scenarios of building k9s by hand vs using the binary releases? Tx!!

No package for Fedora 32… ☺ I tried version v0.22.0 and it is running fine. I can use that.

Thank you.

@ygworldr Thank you for reporting back!! Very cool, I'll close for now. Please reopen if still having issues

/cc @luckielordie @MilesLin @yodalived

@derailed You are most welcome. Now, I need to get to grips with it all! :grin:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pgoodjohn picture pgoodjohn  Â·  4Comments

signaleleven picture signaleleven  Â·  3Comments

andrej-pavlov picture andrej-pavlov  Â·  3Comments

krysopath picture krysopath  Â·  3Comments

dalgibbard picture dalgibbard  Â·  3Comments