0

I am using RHEL7.9 in my Virtual Box. I installed the binary file of node_exporter as explained in the official documentation. I tried to run node_exporter using the following command:

./node_exporter

but it shows me the following error, instead of the output of the documentation:

ERROR: node_exporter: cannot execute binary file

How to solve it and why is this happening in my machine?

Official Documentation that I followed: https://prometheus.io/docs/guides/node-exporter/

commands in documentation

Bob
  • 5,805
  • 7
  • 25
Jd_mahmud
  • 1
  • 1
  • 2
  • Most probably the binary has been compiled for a different architecture. Check your architecture (`uname -i`) and get a matching binary. – Gerald Schneider Jan 18 '22 at 09:49
  • Please when posting console output / settings format it as "`code`" using [Markdown](http://serverfault.com/editing-help) and/or the formatting options in the edit menu to properly type-set your posts. Also use copy-paste and avoid posting screenshots of text. That improves readability, attracts better answers and allows indexing by search engines, which may help people with similar questions. – Bob Jan 18 '22 at 13:55

1 Answers1

2

You are trying to run a MacOS binary (darwin-amd64). You need to download the correct binary for your OS and architecture - linux-amd64.

AlexD
  • 8,747
  • 2
  • 29
  • 38