Problem compiling filebeat from source

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.

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

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.

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.

$ cat .go-version
1.12.9

Thank you @Michael_Madden

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

I ran

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.

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.

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.

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.

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