zgrab2 icon indicating copy to clipboard operation
zgrab2 copied to clipboard

io_prometheus_client does not implement protoreflect.ProtoMessage

Open den78932 opened this issue 3 years ago • 4 comments

after running "go get github.com/zmap/zgrab2"

I'm getting the following error:


go get github.com/zmap/zgrab2
# github.com/prometheus/common/expfmt
src/github.com/prometheus/common/expfmt/decode.go:89:38: cannot use v (variable of type *io_prometheus_client.MetricFamily) as type protoreflect.ProtoMessage in argument to pbutil.ReadDelimited:
	*io_prometheus_client.MetricFamily does not implement protoreflect.ProtoMessage (missing ProtoReflect method)
src/github.com/prometheus/common/expfmt/encode.go:120:40: cannot use v (variable of type *io_prometheus_client.MetricFamily) as type protoreflect.ProtoMessage in argument to pbutil.WriteDelimited:
	*io_prometheus_client.MetricFamily does not implement protoreflect.ProtoMessage (missing ProtoReflect method)

Installing it on Debian 10 go version go1.19.3 linux/amd64 $GOPATH is setup any help is highly appreciated

den78932 avatar Nov 02 '22 23:11 den78932

try to set:

go env -w GO111MODULE=auto

then give it a try - I had the similar issue, got fixed with this.

ali-encord avatar Nov 04 '22 15:11 ali-encord

try to set:

go env -w GO111MODULE=auto

then give it a try - I had the similar issue, got fixed with this.

Thank you for the suggestion. It still gives me this error, but at least I was able to "make" it.

den78932 avatar Nov 04 '22 21:11 den78932

try to set: go env -w GO111MODULE=auto then give it a try - I had the similar issue, got fixed with this.

Thank you for the suggestion. It still gives me this error, but at least I was able to "make" it.

Got the same error even using the go env command. What was your solution?

Edit: btw, I just compiled the source.

rf-peixoto avatar Mar 29 '23 16:03 rf-peixoto

I moved from Debian 10 to Ubuntu 22, and it worked without any issues.

den78932 avatar Mar 29 '23 18:03 den78932