Closed hacker-cb closed 7 years ago
All the dependencies should be vendored since changeset 813d263ec74d3df5e6ecdc317016269fb7a30512 back in May. What go version are you using? If 1.5, make sure GO15VENDOREXPERIMENT=1. If older than 1.5, time to upgrade.
I have upgraded and all works fine now. Thank you.
Great, glad I could help.
I am seeing the same as @Hacker-CB. Documentation for 1.12.4 says "This release removes support for the GO15VENDOREXPERIMENT
environment variable". Any ideas?
$ go version go1.12.4 linux/amd64
$ go build metrics.go:4:2: cannot find package "bosun.org/opentsdb" in any of: /usr/local/go/src/bosun.org/opentsdb (from $GOROOT) /root/go/src/bosun.org/opentsdb (from $GOPATH) main.go:17:2: cannot find package "github.com/prometheus/client_golang/prometheus" in any of: /usr/local/go/src/github.com/prometheus/client_golang/prometheus (from $GOROOT) /root/go/src/github.com/prometheus/client_golang/prometheus (from $GOPATH) main.go:18:2: cannot find package "github.com/prometheus/client_golang/prometheus/promhttp" in any of: /usr/local/go/src/github.com/prometheus/client_golang/prometheus/promhttp (from $GOROOT) /root/go/src/github.com/prometheus/client_golang/prometheus/promhttp (from $GOPATH) metrics.go:9:2: cannot find package "github.com/prometheus/client_model/go" in any of: /usr/local/go/src/github.com/prometheus/client_model/go (from $GOROOT) /root/go/src/github.com/prometheus/client_model/go (from $GOPATH) metrics.go:10:2: cannot find package "github.com/prometheus/common/expfmt" in any of: /usr/local/go/src/github.com/prometheus/common/expfmt (from $GOROOT) /root/go/src/github.com/prometheus/common/expfmt (from $GOPATH)
GO15VENDOREXPERIMENT is no longer needed, as of Go 1.6 it was the default behaviour and as of Go 1.7 it was removed as an option altogether.
It looks like you haven't set the env var GOPATH
, which means Go is using the default of $HOME/go
. Projects that don't use the newfangled Go Modules feature (which is true of script-exporter) need to be checked out under $GOPATH/src/pkgpath to work properly. In your case, it looks like you're running as root, so you should clone the repo to /root/go/src/github.com/ncabatoff/script-exporter
.
You're probably aware already, but do note that I make binary releases available for most platforms (on the releases tab of the project), and also docker.
It is impossible to compile project now. Seems that dependencies was moved