raintank / raintank-collector

Raintank Remote Collector Agent
26 stars 4 forks source link

Golang version important - 1.2 no good #42

Closed 1tylermitchell closed 8 years ago

1tylermitchell commented 8 years ago

I was running go1.2.1 but got these errors when trying to install raintank-probe

$ go get github.com/raintank/raintank-probe
# github.com/miekg/dns
../gocode/src/github.com/miekg/dns/client.go:431: undefined: tls.DialWithDialer
../gocode/src/github.com/miekg/dns/dnssec.go:257: undefined: crypto.Signer
../gocode/src/github.com/miekg/dns/dnssec.go:321: undefined: crypto.Signer
../gocode/src/github.com/miekg/dns/sig0.go:16: undefined: crypto.Signer

This was latest version in stock Ubuntu.

Solution, add this repository instead and get latest version:

sudo add-apt-repository ppa:ubuntu-lxc/lxd-stable
$ sudo apt-get update
$ sudo apt-get install golang

Then the installer is happier .. but not perfect:

$ go get github.com/raintank/raintank-probe
# github.com/raintank/raintank-probe/checks
src/github.com/raintank/raintank-probe/checks/ping.go:11: import /home/tyler/src/gocode/pkg/linux_amd64/github.com/raintank/go-pinger.a: object is [linux amd64 go1.2.1 X:none] expected [linux amd64 go1.6 X:none]

This is because there are 1.2 files in the GOPATH, so I create a new GOPATH folder and set it in the environment variable. Then the "go get" command ends without any complaining.