# Bizarre Error: bash: ./filebeat: No such file or directory

**URL:** <https://discuss.elastic.co/t/bizarre-error-bash-filebeat-no-such-file-or-directory/296407>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [February 7, 2022, 2:35am UTC](https://discuss.elastic.co/t/bizarre-error-bash-filebeat-no-such-file-or-directory/296407 "2022-02-07T02:35:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jarbird](https://avatars.discourse-cdn.com/v4/letter/j/5daacb/32.png) [@Jarbird](https://discuss.elastic.co/u/Jarbird)\
**Post date:** [February 7, 2022, 2:35am UTC](https://discuss.elastic.co/t/bizarre-error-bash-filebeat-no-such-file-or-directory/296407/1 "2022-02-07T02:35:10Z")

</div>

So this is a surreal one... I am having issues with modules not working, and I suspect an unnamed distribution is packaging and/or installing it wrong. At my wits end I decided to manually download the precompiled binaries and give it a shot.

I downloaded from here:

```auto
https://www.elastic.co/downloads/past-releases/filebeat-7-16-3

```

And specifically the LINUX X86\_64 item. Noting the distro installed is Alpine 3.15 x86\_64:

```auto
https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-7.16.3-linux-x86_64.tar.gz

```

I then uncompressed that which creates the following directory which of course is populated with everything we expect:

```auto
/root/filebeat-7.16.3-linux-x86_64

```

Within that directory I edit filebeat.yml to suit my needs and then run:

```auto
./filebeat -f filebeat.yml

```

And I am presented with a rather surreal error:

```auto
bash: ./filebeat: No such file or directory

```

.... Ummmm, what?? Maybe i'm nuts so let's check:

```auto
# pwd
/root/filebeat-7.16.3-linux-x86_64

# ls -lh filebeat
-rwx------ 1 root root 119.4M Jan 7 00:42 filebeat

# /root/filebeat-7.16.3-linux-x86_64/filebeat -f /root/filebeat-7.16.3-linux-x86_64/filebeat.yml 
bash: /root/filebeat-7.16.3-linux-x86_64/filebeat: No such file or directory

# ls -lh /root/filebeat-7.16.3-linux-x86_64/filebeat
-rwx------ 1 root root 119.4M Jan 7 00:42 /root/filebeat-7.16.3-linux-x86_64/filebeat

# ls -lh /root/filebeat-7.16.3-linux-x86_64/filebeat.yml
-rw------- 1 root root 8.1K Feb 7 02:15 /root/filebeat-7.16.3-linux-x86_64/filebeat.yml

# file /root/filebeat-7.16.3-linux-x86_64/filebeat /root/filebeat-7.16.3-linux-x86_64/filebeat.yml
/root/filebeat-7.16.3-linux-x86_64/filebeat: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, Go BuildID=Kd7qKZwbIQ0ZbWeILMae/PlYgfX-Aj6ID6hwBbJMz/YR4l6CDB0evO8lr6B8Kr/qzGu4DnaT9rt2TgIKW07, BuildID[sha1]=772d3bf186367644fb63b09246b840931448c00b, stripped
/root/filebeat-7.16.3-linux-x86_64/filebeat.yml: ASCII text

```

So um. What is going on here? I have been doing linux stuff for well over 20 years and I haven't seen THIS before. What is going on?

---

<div class="post-metadata">

**Author:** ![kvch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kvch/32/72058_2.png) [@kvch](https://discuss.elastic.co/u/kvch)\
**Post date:** [February 7, 2022, 1:20pm UTC](https://discuss.elastic.co/t/bizarre-error-bash-filebeat-no-such-file-or-directory/296407/2 "2022-02-07T13:20:36Z")

</div>

I am not sure exactly. But `filebeat` does not provide a `-f` flag. When I download Filebeat and run the same commands you provided, I get this error:

```auto
$ ./filebeat -f filebeat.yml
Error: unknown shorthand flag: 'f' in -f
Usage:
  filebeat [flags]
  filebeat [command]

Available Commands:
  export Export current config or index template
  generate Generate Filebeat modules, filesets and fields.yml
  help Help about any command
  keystore Manage secrets keystore
  modules Manage configured modules
  run Run filebeat
  setup Setup index template, dashboards and ML jobs
  test Test config
  version Show current version info

Flags:
  -E, --E setting=value Configuration overwrite
  -M, --M setting=value Module configuration overwrite
  -N, --N Disable actual publishing for testing
  -c, --c string Configuration file, relative to path.config (default "filebeat.yml")
      --cpuprofile string Write cpu profile to file
  -d, --d string Enable certain debug selectors
  -e, --e Log to stderr and disable syslog/file output
      --environment environmentVar set environment being ran in (default default)
  -h, --help help for filebeat
      --httpprof string Start pprof http server
      --memprofile string Write memory profile to this file
      --modules string List of enabled modules (comma separated)
      --once Run filebeat only once until all harvesters reach EOF
      --path.config string Configuration path
      --path.data string Data path
      --path.home string Home path
      --path.logs string Logs path
      --plugin pluginList Load additional plugins
      --strict.perms Strict permission checking on config files (default true)
      --system.hostfs string Mount point of the host's filesystem for use in monitoring a host from within a container
  -v, --v Log at INFO level

Use "filebeat [command] --help" for more information about a command.

```

Maybe bash swallows the error message or tries to find a `filebeat` command that has a `-f` flag.

---

<div class="post-metadata">

**Author:** ![Jarbird](https://avatars.discourse-cdn.com/v4/letter/j/5daacb/32.png) [@Jarbird](https://discuss.elastic.co/u/Jarbird)\
**Post date:** [February 7, 2022, 3:39pm UTC](https://discuss.elastic.co/t/bizarre-error-bash-filebeat-no-such-file-or-directory/296407/3 "2022-02-07T15:39:03Z")

</div>

It appears that I was up way WAAAY too late working on this. I have no idea where I got the -f flag from, it should have been -c. Still however:

```auto
alpine-fb-test:~/filebeat-7.16.3-linux-x86_64# ./filebeat -c ./filebeat.yml 
bash: ./filebeat: No such file or directory

```

Lol. I suppose i'll try to compile it instead.

---

<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:** [March 7, 2022, 5:39pm UTC](https://discuss.elastic.co/t/bizarre-error-bash-filebeat-no-such-file-or-directory/296407/4 "2022-03-07T17:39:49Z")

</div>

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