Make fails for Examplebeat on Debian 8

Hi everyone

I followed the manual on how to create your own beat (examplebeat/countbeat), but I got stuck on the make part on a Debian 8 system. I got the following errors:

root@bamboojessie:~/go/src/github.com/dcroonen/examplebeat# make
go build -i
../../elastic/beats/libbeat/processors/add_cloud_metadata/add_cloud_metadata.go:5:2: cannot find package "context" in any of:
	/usr/lib/go/src/pkg/context (from $GOROOT)
	/root/go/src/context (from $GOPATH)
../../elastic/beats/libbeat/outputs/kafka/client.go:8:2: cannot find package "github.com/Shopify/sarama" in any of:
	/usr/lib/go/src/pkg/github.com/Shopify/sarama (from $GOROOT)
	/root/go/src/github.com/Shopify/sarama (from $GOPATH)
../../elastic/beats/libbeat/common/docker/watcher.go:9:2: cannot find package "github.com/docker/docker/api/types" in any of:
	/usr/lib/go/src/pkg/github.com/docker/docker/api/types (from $GOROOT)
	/root/go/src/github.com/docker/docker/api/types (from $GOPATH)
../../elastic/beats/libbeat/common/docker/watcher.go:10:2: cannot find package "github.com/docker/docker/api/types/events" in any of:
	/usr/lib/go/src/pkg/github.com/docker/docker/api/types/events (from $GOROOT)
	/root/go/src/github.com/docker/docker/api/types/events (from $GOPATH)

...

../../elastic/beats/libbeat/common/docker/watcher.go:14:2: cannot find package "golang.org/x/net/context" in any of:
	/usr/lib/go/src/pkg/golang.org/x/net/context (from $GOROOT)
	/root/go/src/golang.org/x/net/context (from $GOPATH)
../../elastic/beats/libbeat/outputs/transport/proxy.go:7:2: cannot find package "golang.org/x/net/proxy" in any of:
	/usr/lib/go/src/pkg/golang.org/x/net/proxy (from $GOROOT)
	/root/go/src/golang.org/x/net/proxy (from $GOPATH)
../../elastic/beats/libbeat/cmd/export/config.go:8:2: cannot find package "gopkg.in/yaml.v2" in any of:
	/usr/lib/go/src/pkg/gopkg.in/yaml.v2 (from $GOROOT)
	/root/go/src/gopkg.in/yaml.v2 (from $GOPATH)
vendor/github.com/elastic/beats/libbeat/scripts/Makefile:91: recipe for target 'examplebeat' failed
make: *** [examplebeat] Error 1

The $GOPATH environment variable is set to /root/go. The 'missing' packages are there but they are located in a different directory. For example golang.org/x/net/context is present in:

/root/go/src/github.com/dcroonen/examplebeat/vendor/github.com/elastic/beats/vendor/golang.org/x/net/context

OR

/root/go/src/github.com/elastic/beats/vendor/golang.org/x/net/context

Anybody any ideas how to solve this?

P.S.: I followed the same manual a few weeks ago on my mac and everything worked straight out of the box.

Whats $ go version saying. The golang.org/x/net/context package is somewhat outdated, as context has been moved to the stdlib.

OK nervermind go version was go1.3.3 linux/amd64.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.