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

Build error: does not contain package github.com/prometheus/common/log #232

Closed
shabeermm opened this issue Jun 14, 2021 · 1 comment · Fixed by #246
Closed

Build error: does not contain package github.com/prometheus/common/log #232

shabeermm opened this issue Jun 14, 2021 · 1 comment · Fixed by #246

Comments

@shabeermm
Copy link

Hi,

When building the latest kafka_Exporter i am getting the below error.
It seems you may need to remove/update the references to the non existing module "github.com/prometheus/common/log" from the code. Please verify and fix accordingly,
Thanks, Shabeer

$mv vendor _vendor
$make build
go: github.com/prometheus/client_golang upgrade => v1.11.0
go: golang.org/x/sys upgrade => v0.0.0-20210611083646-a4fc73990273
go: golang.org/x/net upgrade => v0.0.0-20210610132358-84b48f89b13b
go: github.com/prometheus/procfs upgrade => v0.6.0
go: github.com/prometheus/common upgrade => v0.29.0
go: gopkg.in/yaml.v2 upgrade => v2.4.0
go: github.com/prometheus/client_model upgrade => v0.2.0
go: github.com/beorn7/perks upgrade => v1.0.1
go: google.golang.org/appengine upgrade => v1.6.7
go: go.uber.org/atomic upgrade => v1.8.0
go: github.com/golang/protobuf upgrade => v1.5.2
go: github.com/pkg/errors upgrade => v0.9.1
go: google.golang.org/protobuf upgrade => v1.26.0
go: github.com/alecthomas/units upgrade => v0.0.0-20210208195552-ff826a37aa15
go: golang.org/x/oauth2 upgrade => v0.0.0-20210514164344-f6687ab2804c
go: github.com/google/go-querystring upgrade => v1.1.0
go: github.com/alecthomas/template upgrade => v0.0.0-20190718012654-fb15b899a751

building binaries
kafka_exporter-1.3.1
go: finding module for package github.com/prometheus/common/log
kafka_exporter.go:22:2: module github.com/prometheus/common@latest found (v0.29.0), but does not contain package github.com/prometheus/common/log
!! command failed: build -o /home/opc/own/exporters/kafka-exporter/kafka_exporter-1.3.1/kafka_exporter-1.3.1 -ldflags -X github.com/danielqsj/kafka_exporter/vendor/github.com/prometheus/common/version.Version=1.3.1 -X github.com/danielqsj/kafka_exporter/vendor/github.com/prometheus/common/version.Revision=non-git -X github.com/danielqsj/kafka_exporter/vendor/github.com/prometheus/common/version.Branch=non-git -X github.com/danielqsj/kafka_exporter/vendor/github.com/prometheus/common/version.BuildUser=opc@oci-vm-shabeermm -X github.com/danielqsj/kafka_exporter/vendor/github.com/prometheus/common/version.BuildDate=20210614-10:22:03 -extldflags '-static' -a -tags netgo github.com/danielqsj/kafka_exporter: exit status 1
make: *** [build] Error 1


@mihail-i4v
Copy link
Contributor

mihail-i4v commented Aug 2, 2021

This seems to be caused by the removal of the log package in the commons module - https://github.com/prometheus/common/releases/tag/v0.27.0.

Other people are having similar issues and linked them to this PR - prometheus/common#306.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants