I'm trying to install Filebeat (elasticsearch log shipping) on PfSense 2.4.5. I follow the instruction from: https://blog.securitybits.io/2019/12/beats-7.5.0-on-pfsense-2.4.4/ At the make step, I got the problem:

# cd filebeat/
# gmake
go build -ldflags "-X github.com/elastic/beats/libbeat/version.buildTime=2020-05-18T08:05:30Z -X github.com/elastic/beats/libbeat/version.commit=6a23e8f8f30f5001ba344e                                        4e54d8d9cb82cb107c"
# github.com/elastic/beats/vendor/github.com/DataDog/zstd
exec: "clang": executable file not found in $PATH
# github.com/elastic/beats/vendor/github.com/elastic/gosigar
exec: "clang": executable file not found in $PATH
gmake: *** [../libbeat/scripts/Makefile:121: filebeat] Error 2

I'm not know about docker and golang so if anyone know the solution to fix that please share with me. Very need filebeat on my pfSense box. Thanks a lots

  • 1
    Did you try installing the clang compiler? – Kusalananda May 19 '20 at 6:10
  • I tried but nothing change – mtpumpkin May 20 '20 at 3:36
  • What do you mean by "I tried"? Did it fail to install? What error messages did you get? – AdminBee May 20 '20 at 9:30

The first and most important lesson you need to learn is to act on your error messages. It is not 14 hours since you asked another question and the answer was directly in the error message. The community is happy to help and beginners are more than welcome. But a minimum effort on your behalf is appreciated.

Stating what part you do not understand and what you tried yourself is crucial. "I need filebeat" is not enough. We are happy to help you understand the problems - not as a free general support channel.

Try by focusing on the first error given:

exec: "clang": executable file not found in $PATH

If you do not know it - then learn the command which(1). This searches your $PATH to locate a file.

$ which clang

With the error message you see you will probably not find anything. But it is an important test - maybe the gmake was running in a different environment and a different $PATH.

Then I would examine how your $PATH looks like.

$ echo $PATH

The next tool we then must learn is whereis(1). This also searches outside your $PATH.

$ whereis clang
clang: /usr/bin/clang /usr/share/man/man1/clang.1.gz /usr/src/usr.bin/clang

If you still have not found clang then it looks like it is simply not installed. It is installed by default on a recent FreeBSD system (10.x released in 2015). This leads me to believe that you are not following the instructions you specified yourself. My guess is that you are working directly on a pfsense box which has a limited toolset installed. This is why we often specify the output of uname -a.

You can go one step further by searching the full system. Have a look at locate(1)

$ locate clang

And find(1)

$ find /usr -name "clang"
  • Hi, sorry for hearing that. That is a different question for another issue because I'm trying many ways to have filebeat run on my server. Thanks for your answer! – mtpumpkin May 20 '20 at 3:38

Not the answer you're looking for? Browse other questions tagged or ask your own question.