# Make fails for Examplebeat on Debian 8

**URL:** <https://discuss.elastic.co/t/make-fails-for-examplebeat-on-debian-8/120602>\
**Category:** Beats\
**Tags:** beats-development\
**Created:** [February 20, 2018, 10:15am UTC](https://discuss.elastic.co/t/make-fails-for-examplebeat-on-debian-8/120602 "2018-02-20T10:15:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dcroonen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dcroonen/32/27450_2.png) [@dcroonen](https://discuss.elastic.co/u/dcroonen)\
**Post date:** [February 20, 2018, 10:15am UTC](https://discuss.elastic.co/t/make-fails-for-examplebeat-on-debian-8/120602/1 "2018-02-20T10:15:37Z")

</div>

Hi everyone

I followed the [manual](https://www.elastic.co/guide/en/beats/devguide/6.0/new-beat.html) 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.

---

<div class="post-metadata">

**Author:** ![steffens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steffens/32/79630_2.png) [@steffens](https://discuss.elastic.co/u/steffens)\
**Post date:** [February 20, 2018, 2:08pm UTC](https://discuss.elastic.co/t/make-fails-for-examplebeat-on-debian-8/120602/2 "2018-02-20T14:08:55Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dcroonen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dcroonen/32/27450_2.png) [@dcroonen](https://discuss.elastic.co/u/dcroonen)\
**Post date:** [February 20, 2018, 2:58pm UTC](https://discuss.elastic.co/t/make-fails-for-examplebeat-on-debian-8/120602/3 "2018-02-20T14:58:59Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 20, 2018, 2:58pm UTC](https://discuss.elastic.co/t/make-fails-for-examplebeat-on-debian-8/120602/4 "2018-03-20T14:58:59Z")

</div>

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