# Makefile:294: recipe for target 'update' failed

**URL:** <https://discuss.elastic.co/t/makefile-294-recipe-for-target-update-failed/124728>\
**Category:** Beats\
**Tags:** beats-development\
**Created:** [March 20, 2018, 10:15am UTC](https://discuss.elastic.co/t/makefile-294-recipe-for-target-update-failed/124728 "2018-03-20T10:15:06Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![thro](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thro/32/29022_2.png) [@thro](https://discuss.elastic.co/u/thro)\
**Post date:** [March 20, 2018, 10:15am UTC](https://discuss.elastic.co/t/makefile-294-recipe-for-target-update-failed/124728/1 "2018-03-20T10:15:06Z")

</div>

Hi, new to beats here.

I am trying to build the beats project straight out of github and I need some help.

```
user@ubuntu17:~/code/beats$ make

```

The problem seems to be related to \_meta/beat.yml not being in the place expected:

```
make[1]: Entering directory '/home/user/code/beats/libbeat'
Running virtualenv with interpreter /usr/bin/python2
New python executable in /home/user/code/beats/libbeat/build/python-env/bin/python2
Also creating executable in /home/user/code/beats/libbeat/build/python-env/bin/python
Installing setuptools, pkg_resources, pip, wheel...done.
Updating generated files for libbeat
cat: _meta/beat.yml: No such file or directory
cat: _meta/beat.yml: No such file or directory
make[2]: Entering directory '/home/user/code/beats/libbeat'
make[2]: Leaving directory '/home/user/code/beats/libbeat'
bash: go: command not found
scripts/Makefile:294: recipe for target 'update' failed
make[1]: *** [update] Error 127
make[1]: Leaving directory '/home/user/code/beats/libbeat'
Makefile:21: recipe for target 'testsuite' failed
make: *** [testsuite] Error 1

```

I installed the dependencies I could figured out:

```
sudo apt install golang-1.9 virtualenv

golang-1.9: 1.9.1-2ubuntu1
virtualenv: 15.1.0+ds-1

```

So, can anyone help?

---

<div class="post-metadata">

**Author:** ![exekias](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/exekias/32/28718_2.png) [@exekias](https://discuss.elastic.co/u/exekias)\
**Post date:** [March 20, 2018, 10:19am UTC](https://discuss.elastic.co/t/makefile-294-recipe-for-target-update-failed/124728/2 "2018-03-20T10:19:01Z")

</div>

Hi @thro,

Probably you need to install `golang-1.9-go` too

---

<div class="post-metadata">

**Author:** ![thro](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thro/32/29022_2.png) [@thro](https://discuss.elastic.co/u/thro)\
**Post date:** [March 20, 2018, 10:43am UTC](https://discuss.elastic.co/t/makefile-294-recipe-for-target-update-failed/124728/3 "2018-03-20T10:43:21Z")

</div>

Hi @exekias,

It seems to be installed and at the newest version:

```
golang-1.9-go is already the newest version (1.9.1-2ubuntu1)
```

---

<div class="post-metadata">

**Author:** ![exekias](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/exekias/32/28718_2.png) [@exekias](https://discuss.elastic.co/u/exekias)\
**Post date:** [March 20, 2018, 10:44am UTC](https://discuss.elastic.co/t/makefile-294-recipe-for-target-update-failed/124728/4 "2018-03-20T10:44:17Z")

</div>

What happens if you try to run `go`? It should be available under $PATH for `make` to work

---

<div class="post-metadata">

**Author:** ![thro](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thro/32/29022_2.png) [@thro](https://discuss.elastic.co/u/thro)\
**Post date:** [March 20, 2018, 11:00am UTC](https://discuss.elastic.co/t/makefile-294-recipe-for-target-update-failed/124728/5 "2018-03-20T11:00:06Z")

</div>

Thank you, I'm also new to go so figuring this out as I go.

It looks like it's not in path, I will take a look in a bit:

```
user@ubuntu17:~/code/beats$ go

The program 'go' can be found in the following packages:
 * golang-go
 * gccgo-go
Try: sudo apt install <selected package>
```

---

<div class="post-metadata">

**Author:** ![thro](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thro/32/29022_2.png) [@thro](https://discuss.elastic.co/u/thro)\
**Post date:** [March 20, 2018, 1:51pm UTC](https://discuss.elastic.co/t/makefile-294-recipe-for-target-update-failed/124728/6 "2018-03-20T13:51:02Z")

</div>

\*facepalm\* ... 'go' was not in path. Like clearly stated in the error output.

Fixed it with:

```
sudo update-alternatives --install /usr/bin/go go /usr/lib/go-1.9/bin/go 50 --slave /usr/bin/gofmt gofmt /usr/lib/go-1.9/bin/gofmt

```

Then I got new problem

```
user@ubuntu17:~/code/beats$ make

make[1]: Entering directory '/home/user/code/beats/libbeat'
Running virtualenv with interpreter /usr/bin/python2
New python executable in /home/user/code/beats/libbeat/build/python-env/bin/python2
Also creating executable in /home/user/code/beats/libbeat/build/python-env/bin/python
Installing setuptools, pkg_resources, pip, wheel...done.
Updating generated files for libbeat
cat: _meta/beat.yml: No such file or directory
cat: _meta/beat.yml: No such file or directory
make[2]: Entering directory '/home/user/code/beats/libbeat'
make[2]: Leaving directory '/home/user/code/beats/libbeat'
../dev-tools/cmd/kibana_index_pattern/kibana_index_pattern.go:8:2: cannot find package "github.com/elastic/beats/libbeat/common" in any of:
    /usr/lib/go-1.9/src/github.com/elastic/beats/libbeat/common (from $GOROOT)
    /home/user/go/src/github.com/elastic/beats/libbeat/common (from $GOPATH)
../dev-tools/cmd/kibana_index_pattern/kibana_index_pattern.go:9:2: cannot find package "github.com/elastic/beats/libbeat/kibana" in any of:
    /usr/lib/go-1.9/src/github.com/elastic/beats/libbeat/kibana (from $GOROOT)
    /home/user/go/src/github.com/elastic/beats/libbeat/kibana (from $GOPATH)
../dev-tools/cmd/kibana_index_pattern/kibana_index_pattern.go:10:2: cannot find package "github.com/elastic/beats/libbeat/version" in any of:
    /usr/lib/go-1.9/src/github.com/elastic/beats/libbeat/version (from $GOROOT)
    /home/user/go/src/github.com/elastic/beats/libbeat/version (from $GOPATH)
scripts/Makefile:294: recipe for target 'update' failed
make[1]: *** [update] Error 1
make[1]: Leaving directory '/home/user/code/beats/libbeat'
Makefile:21: recipe for target 'testsuite' failed
make: *** [testsuite] Error 1

```

Which I fixed with:

```
go get github.com/elastic/beats/libbeat
```

---

<div class="post-metadata">

**Author:** ![thro](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thro/32/29022_2.png) [@thro](https://discuss.elastic.co/u/thro)\
**Post date:** [March 20, 2018, 1:54pm UTC](https://discuss.elastic.co/t/makefile-294-recipe-for-target-update-failed/124728/7 "2018-03-20T13:54:34Z")

</div>

But now I had a brand new problem, how do I get '/bin/gotestcover' for the unit tests:

```
user@ubuntu17:~/code/beats$ make

make[1]: Entering directory '/home/user/code/beats/libbeat'
Running virtualenv with interpreter /usr/bin/python2
New python executable in /home/user/code/beats/libbeat/build/python-env/bin/python2
Also creating executable in /home/user/code/beats/libbeat/build/python-env/bin/python
Installing setuptools, pkg_resources, pip, wheel...done.
Updating generated files for libbeat
cat: _meta/beat.yml: No such file or directory
cat: _meta/beat.yml: No such file or directory
make[2]: Entering directory '/home/user/code/beats/libbeat'
make[2]: Leaving directory '/home/user/code/beats/libbeat'
-- The index pattern was created under /home/user/code/beats/libbeat/_meta/kibana/5/index-pattern/libbeat.json
-- The index pattern was created under /home/user/code/beats/libbeat/_meta/kibana/6/index-pattern/libbeat.json
make unit-tests
make[2]: Entering directory '/home/user/code/beats/libbeat'
mkdir -p /home/user/code/beats/libbeat/build/coverage
# gotestcover is needed to fetch coverage for multiple packages
go get github.com/elastic/beats/vendor/github.com/pierrre/gotestcover
# testify is needed for unit and integration tests
go get github.com/elastic/beats/vendor/github.com/stretchr/testify/assert
# libcompose is needed for integration tests
go get github.com/docker/libcompose
go test -i github.co.....bbeat/version
/bin/gotestcover -coverprofile=/hom......bbeat/version
bash: /bin/gotestcover: No such file or directory
scripts/Makefile:164: recipe for target 'unit-tests' failed
make[2]: *** [unit-tests] Error 127
make[2]: Leaving directory '/home/user/code/beats/libbeat'
scripts/Makefile:249: recipe for target 'testsuite' failed
make[1]: *** [testsuite] Error 2
make[1]: Leaving directory '/home/user/code/beats/libbeat'
Makefile:21: recipe for target 'testsuite' failed
make: *** [testsuite] Error 1

```

Which I fixed with:

```
go get github.com/powerman/gotestcover
sudo ln -s /home/user/go/bin/gotestcover /bin/gotestcover
```

---

<div class="post-metadata">

**Author:** ![thro](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thro/32/29022_2.png) [@thro](https://discuss.elastic.co/u/thro)\
**Post date:** [March 20, 2018, 3:50pm UTC](https://discuss.elastic.co/t/makefile-294-recipe-for-target-update-failed/124728/8 "2018-03-20T15:50:38Z")

</div>

Thanks @exekias, you got me started.

There is still some problems still building out of the box, but what I wanted to do for now is crosscompile for arm.

That seems to be working so I am not going any deeper down the rabbit hole.

---

<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:** [April 17, 2018, 3:50pm UTC](https://discuss.elastic.co/t/makefile-294-recipe-for-target-update-failed/124728/9 "2018-04-17T15:50:48Z")

</div>

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