# Make filebeat error: cannot find package "github.com/elastic/beats/filebeat/beater" in any of:

**URL:** <https://discuss.elastic.co/t/make-filebeat-error-cannot-find-package-github-com-elastic-beats-filebeat-beater-in-any-of/96348>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [August 8, 2017, 10:25pm UTC](https://discuss.elastic.co/t/make-filebeat-error-cannot-find-package-github-com-elastic-beats-filebeat-beater-in-any-of/96348 "2017-08-08T22:25:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![filebeater](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/filebeater/32/18565_2.png) [@filebeater](https://discuss.elastic.co/u/filebeater)\
**Post date:** [August 8, 2017, 10:25pm UTC](https://discuss.elastic.co/t/make-filebeat-error-cannot-find-package-github-com-elastic-beats-filebeat-beater-in-any-of/96348/1 "2017-08-08T22:25:05Z")

</div>

I install the beats directory under beats-5.5.1.  
when i go to beats-5.5.1/filebeat, and run "make", got the following error:  
go build  
main.go:6:2: cannot find package "[github.com/elastic/beats/filebeat/beater](http://github.com/elastic/beats/filebeat/beater)" in any of:  
/home/yyu/svn/in-beats\_trunk/.go-tools/go/src/github.com/elastic/beats/filebeat/beater (from $GOROOT)  
/home/yyu/svn/in-beats\_trunk/.go-tools/src/github.com/elastic/beats/filebeat/beater (from $GOPATH)  
main.go:7:2: cannot find package "[github.com/elastic/beats/libbeat/beat](http://github.com/elastic/beats/libbeat/beat)" in any of:  
/home/yyu/svn/in-beats\_trunk/.go-tools/go/src/github.com/elastic/beats/libbeat/beat (from $GOROOT)  
/home/yyu/svn/in-beats\_trunk/.go-tools/src/github.com/elastic/beats/libbeat/beat (from $GOPATH)  
make: \*\*\* [filebeat] Error 1

It seems like filebeat is expected to be installed under $GOROOT/src/github.com/elastic/beats?  
otherwise the build wont work?

Could you please confirm this? and curious why this is enforced this way, why the directory is not relative to $BEATS-HOME, as opposed to assuming BEATS\_HOME = $GOROOT/src/github.com/elastic/beats?

thanks!  
yan

---

<div class="post-metadata">

**Author:** ![andrewkroh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrewkroh/32/3784_2.png) [@andrewkroh](https://discuss.elastic.co/u/andrewkroh)\
**Post date:** [August 9, 2017, 1:50am UTC](https://discuss.elastic.co/t/make-filebeat-error-cannot-find-package-github-com-elastic-beats-filebeat-beater-in-any-of/96348/2 "2017-08-09T01:50:45Z")

</div>

It is expected that beats is checked out into its canonical location on the GOPATH (not GOROOT). This is standard for any Go project. See [https://golang.org/doc/code.html#GOPATH](https://golang.org/doc/code.html#GOPATH)

---

<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:** [September 6, 2017, 1:50am UTC](https://discuss.elastic.co/t/make-filebeat-error-cannot-find-package-github-com-elastic-beats-filebeat-beater-in-any-of/96348/3 "2017-09-06T01:50:47Z")

</div>

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