# Problem compiling filebeat from source

**URL:** <https://discuss.elastic.co/t/problem-compiling-filebeat-from-source/203704>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [October 15, 2019, 6:29pm UTC](https://discuss.elastic.co/t/problem-compiling-filebeat-from-source/203704 "2019-10-15T18:29:31Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![thurston](https://avatars.discourse-cdn.com/v4/letter/t/53a042/32.png) [@thurston](https://discuss.elastic.co/u/thurston)\
**Post date:** [October 15, 2019, 6:29pm UTC](https://discuss.elastic.co/t/problem-compiling-filebeat-from-source/203704/1 "2019-10-15T18:29:31Z")

</div>

Working on compiling Filebeat from source to run on arm architecture. This worked for 7.3 without any issues. A new message came up with 7.4

here is a snip of my script that i am using.

```auto
go get github.com/elastic/beats
cd beats
git fetch
git checkout f940c36
GOOS=linux GOARCH=arm go get
make

```

Next I receive this message

```auto
github.com/elastic/beats/filebeat/input/kafka
input/kafka/input.go:197:10: undefined: strings.ReplaceAll

```

I have done a bit of searching but I cant figure out what this message means and why I am receiving it.

---

<div class="post-metadata">

**Author:** ![Michael\_Madden](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/michael_madden/32/46640_2.png) [@Michael\_Madden](https://discuss.elastic.co/u/Michael_Madden)\
**Post date:** [October 15, 2019, 6:46pm UTC](https://discuss.elastic.co/t/problem-compiling-filebeat-from-source/203704/2 "2019-10-15T18:46:34Z")

</div>

Hello, thanks for reaching out about filebeat. Which version of Go are you using? I believe I've seen this error with older versions of Go. We tested version 7.4 with Go 1.12.9. From the top level of the beats directory you can do the following to check the version of Go used for a particular branch.

```bash
$ cat .go-version
1.12.9

```

---

<div class="post-metadata">

**Author:** ![thurston](https://avatars.discourse-cdn.com/v4/letter/t/53a042/32.png) [@thurston](https://discuss.elastic.co/u/thurston)\
**Post date:** [October 15, 2019, 6:52pm UTC](https://discuss.elastic.co/t/problem-compiling-filebeat-from-source/203704/3 "2019-10-15T18:52:37Z")

</div>

Thank you @Michael_Madden

It appears that my system is running go1.11.6 linux/arm.

I ran

```auto
sudo apt install golang-go
golang-go is already the newest version (2:1.11~1+b6)

```

Probably the issue. I'll have to update and re-test.

---

<div class="post-metadata">

**Author:** ![Michael\_Madden](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/michael_madden/32/46640_2.png) [@Michael\_Madden](https://discuss.elastic.co/u/Michael_Madden)\
**Post date:** [October 15, 2019, 6:54pm UTC](https://discuss.elastic.co/t/problem-compiling-filebeat-from-source/203704/4 "2019-10-15T18:54:41Z")

</div>

You're welcome. If you're looking for a way to manage multiple Go versions you may want to look at `gvm`. It lets you run multiple versions of Go with ease.

> **[andrewkroh/gvm](https://github.com/andrewkroh/gvm)**
>
> Go Version Manager (written in Go for cross-platform usability) - andrewkroh/gvm

---

<div class="post-metadata">

**Author:** ![thurston](https://avatars.discourse-cdn.com/v4/letter/t/53a042/32.png) [@thurston](https://discuss.elastic.co/u/thurston)\
**Post date:** [October 15, 2019, 7:44pm UTC](https://discuss.elastic.co/t/problem-compiling-filebeat-from-source/203704/5 "2019-10-15T19:44:39Z")

</div>

Thank you,

Ill go ahead and mark this as the solution even though I am having all sorts of trouble upgrading to Go 1.12.9. Probably user error more than anything. Also, couldnt get gvm to install either.

---

<div class="post-metadata">

**Author:** ![Michael\_Madden](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/michael_madden/32/46640_2.png) [@Michael\_Madden](https://discuss.elastic.co/u/Michael_Madden)\
**Post date:** [October 15, 2019, 7:48pm UTC](https://discuss.elastic.co/t/problem-compiling-filebeat-from-source/203704/6 "2019-10-15T19:48:30Z")

</div>

Thanks. Which operating system are you using? Setting up `gvm` should be pretty easy on Linux or macOS. It should work for Windows as well.

---

<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:** [November 12, 2019, 7:48pm UTC](https://discuss.elastic.co/t/problem-compiling-filebeat-from-source/203704/7 "2019-11-12T19:48:37Z")

</div>

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