Libbeat syntax error logger.go

I'm trying to install a package from beat community but I encounter a syntax error in some file from the github folder of elastic.

According to example on the elastic page, I cloned the elastic/beats directory.
I try to install metricbeat (the error is the same for other package) with:

go install github.com/elastic/beats/metricbeat

But I receive the following error

github.com/elastic/beats/libbeat/logp/logger.go:8: syntax error: unexpected = in type declaration

I don't know how what is the right declaration of this variable in logger.go.

The version of Go that you are using is too old. You need at least Go 1.9.

You can check your go version with the go version command.

1 Like

This topic was automatically closed after 28 days. New replies are no longer allowed.