# Unable to setup File Beats using go

**URL:** <https://discuss.elastic.co/t/unable-to-setup-file-beats-using-go/176980>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [April 15, 2019, 10:09pm UTC](https://discuss.elastic.co/t/unable-to-setup-file-beats-using-go/176980 "2019-04-15T22:09:38Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![johndowe](https://avatars.discourse-cdn.com/v4/letter/j/3ab097/32.png) [@johndowe](https://discuss.elastic.co/u/johndowe)\
**Post date:** [April 15, 2019, 10:09pm UTC](https://discuss.elastic.co/t/unable-to-setup-file-beats-using-go/176980/1 "2019-04-15T22:09:38Z")

</div>

Similar to this : [Error on make setup](https://discuss.elastic.co/t/error-on-make-setup/147473/5)

root@raspberrypi:~/go/src/github.com/elastic/beats/filebeat# GOPATH=~/go make  
Installing mage v1.8.0 from vendor dir.  
bash: mage: command not found  
../dev-tools/make/mage.mk:9: recipe for target 'mage' failed  
make: [mage] Error 127 (ignored)

I have tried the suggested but no luck. Any ideas please ?

---

<div class="post-metadata">

**Author:** ![jsoriano](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsoriano/32/27920_2.png) [@jsoriano](https://discuss.elastic.co/u/jsoriano)\
**Post date:** [April 16, 2019, 8:11am UTC](https://discuss.elastic.co/t/unable-to-setup-file-beats-using-go/176980/2 "2019-04-16T08:11:05Z")

</div>

Hi @johndowe and welcome 🙂

Just to confirm, is this what you tried?

```auto
export GOPATH=~/go
export PATH=$GOPATH/bin/:$PATH
make

```

Regards,  
Jaime.

---

<div class="post-metadata">

**Author:** ![johndowe](https://avatars.discourse-cdn.com/v4/letter/j/3ab097/32.png) [@johndowe](https://discuss.elastic.co/u/johndowe)\
**Post date:** [April 16, 2019, 1:21pm UTC](https://discuss.elastic.co/t/unable-to-setup-file-beats-using-go/176980/3 "2019-04-16T13:21:09Z")

</div>

yes I tried both and still the same error. Let me know if I need to provide you with more information to troubleshoot. thanks again.

---

<div class="post-metadata">

**Author:** ![jsoriano](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsoriano/32/27920_2.png) [@jsoriano](https://discuss.elastic.co/u/jsoriano)\
**Post date:** [April 16, 2019, 5:19pm UTC](https://discuss.elastic.co/t/unable-to-setup-file-beats-using-go/176980/4 "2019-04-16T17:19:26Z")

</div>

After setting the environment variables, is `mage` installed? You can check if the binary is in the path with `which mage`.

If it is not, try to install it with `go get github.com/magefile/mage`.

---

<div class="post-metadata">

**Author:** ![johndowe](https://avatars.discourse-cdn.com/v4/letter/j/3ab097/32.png) [@johndowe](https://discuss.elastic.co/u/johndowe)\
**Post date:** [April 16, 2019, 10:30pm UTC](https://discuss.elastic.co/t/unable-to-setup-file-beats-using-go/176980/5 "2019-04-16T22:30:01Z")

</div>

Thanks @jsoriano this is now resolved 🙂

---

<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:** [May 14, 2019, 10:30pm UTC](https://discuss.elastic.co/t/unable-to-setup-file-beats-using-go/176980/6 "2019-05-14T22:30:07Z")

</div>

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