carlosedp / cluster-monitoring

Cluster monitoring stack for clusters based on Prometheus Operator
MIT License
740 stars 201 forks source link

Error during `make vendor` on raspberry pi "cannot use path@version syntax in GOPATH mode" #172

Closed SilasStokes closed 12 months ago

SilasStokes commented 1 year ago

Describe the bug When attempting to build for k3s after running make vendor I get:

rpi1@rpi1:~/cluster-monitoring $ make vendor
Installing jsonnet-bundler
package github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb@latest: cannot use path@version syntax in GOPATH mode
make: *** [Makefile:52: /home/rpi1/go/bin/jb] Error 1

my go version:

rpi1@rpi1:~/cluster-monitoring $ go version
go version go1.15.15 linux/arm64

I solved the issue by installing the latest version of Go (1.20.6 at the time of this), and adding it to my path before the default installation of Go binary. I think the problem comes down to the switch from go get to go install that happen in #160, the apt package manager is installing a version 1.15.15 as indicated by the version I had on my machine which is incompatible with go install.

Solution I am happy to make a pr with a solution - I would:

  1. add a requirements section to the readme which indicates the minimum version of Go needed.
  2. add a conditional in the Makefile that checks the current version of Go and exits if it's not high enough.