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

cant compile #31

Closed
yctn opened this issue Jan 23, 2019 · 1 comment
Closed

cant compile #31

yctn opened this issue Jan 23, 2019 · 1 comment

Comments

@yctn
Copy link

yctn commented Jan 23, 2019

i ran a git clone https://github.com/f1yegor/clickhouse_exporter and then ran go get which gave me the following error:
`
go get

clickhouse_exporter

./clickhouse_exporter.go:32:25: cannot use e (type *exporter.Exporter) as type "clickhouse_exporter/vendor/github.com/prometheus/client_golang/prometheus".Collector in argument to "clickhouse_exporter/vendor/github.com/prometheus/client_golang/prometheus".MustRegister:
*exporter.Exporter does not implement "clickhouse_exporter/vendor/github.com/prometheus/client_golang/prometheus".Collector (wrong type for Collect method)
have Collect(chan<- "github.com/f1yegor/clickhouse_exporter/vendor/github.com/prometheus/client_golang/prometheus".Metric)
want Collect(chan<- "clickhouse_exporter/vendor/github.com/prometheus/client_golang/prometheus".Metric)
`
Am i doing something wrong here

@shipilovds
Copy link

shipilovds commented Jan 23, 2019

You should set GOROOT and GOPATH
look at this, for example.
Then just type go get github.com/f1yegor/clickhouse_exporter/exporter
and cd ~/go/src/github.com/f1yegor/clickhouse_exporter
After that use Makefile:
make init && make build - that's all you need :)

It helped me for the first time.

@f1yegor f1yegor closed this as completed Mar 15, 2019
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

No branches or pull requests

3 participants