Comments (9)
Hi @flyinva,
the context
package has been added in Go 1.7 and is required to build collectd_exporter.
Best regards,
βocto
from collectd_exporter.
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export PATH=$PATH:$GOROOT/bin
from collectd_exporter.
@padgyx I had the exact same error on centos 7. It runs a very old version of golang (1.6.3) I used this repo and instructions to update, and its working well:
https://go-repo.io/
specifically:
sudo rpm --import https://mirror.go-repo.io/centos/RPM-GPG-KEY-GO-REPO
curl -s https://mirror.go-repo.io/centos/go-repo.repo | tee /etc/yum.repos.d/go-repo.repo
sudo yum update golang
from collectd_exporter.
Go 1.7 is only available in Debian testing. I will have to wait some times for this version in backports.
from collectd_exporter.
It's very unfortunate that there is no good transition path from the old (experimental) x/net/context
package and the Go 1.7 context
package :\
One thing we can consider is add an appropriate build constraint, like:
// +build go1.7
However, the error message when building with earlier versions of Go is something along the lines of:
go build github.com/prometheus/collectd_exporter: no buildable Go source files in $GOPATH/src/github.com/prometheus/collectd_exporter
I'm not sure this error message is an improvement though :\
from collectd_exporter.
collectd_exporter can be build with Go 1.7 on Debian SID (and probably any other distrib) and run on Debian Jessie.
from collectd_exporter.
go get github.com/prometheus/prometheus/cmd/promtool
package context: unrecognized import path "context" (import path does not begin with hostname)
from collectd_exporter.
I'm having the exact same problem and I'm running go version go1.2.1 linux/amd64 on Ubuntu 14 virtual machine.
from collectd_exporter.
You generally need the latest version of Go when building Go components of Prometheus, with the exception of using client_golang which currently supports back to Go 1.7.
from collectd_exporter.
Related Issues (20)
- Many errors when getting /metrics HOT 2
- Collected Exporter with heavy load HOT 5
- collectd_exporter - Prometheus target
- Not receiving any metrics from collectd HOT 1
- SPARC/Solaris compatibility HOT 1
- What's the role of this project vs collectd's write_prometheus plugin? HOT 2
- s390x support in CI HOT 3
- make fails with tcp timeout. HOT 1
- Metrics has different names that with write_prometheus
- errors in metrics output HOT 2
- metrics endpoint is broken with signalfx-metadata plugin
- Installation or Configuration documents
- error "*** was collected before with the same name and label values" HOT 4
- Prometheus collectd-exporter binary for s390x HOT 7
- Switch logging to go-kit
- Prefix to differentiate metrics from different clusters HOT 1
- Docker hub tags don't seem to be up to date HOT 4
- Arm builds HOT 2
- Feature request - Make Timeout configurable via a flag
- HTTPS endpoint HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from collectd_exporter.