Exec Format Error with "Data" File Format

Exec Format Error with "Data" File Format

Does anyone knows why it gives format error when i try to run echo through /bin/echo or /usr/bin/echo but works well if i just type echo in the command line

bash: /usr/bin/echo: cannot execute binary file: Exec format error

The output file /bin/echo

/bin/echo: data

What's that data file format why i cant execute it.

Here is the screenshot, Screenshot

8

1 Answer

There is likely something wrong with your /bin/echo, as you should get something like this when running file on it:

/bin/echo: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=714b557112010bbcd04b0e5e6efc1b106166733c, for GNU/Linux 3.2.0, stripped

We can see that coreutils is the package that is supposed to provide /bin/echo by running:

dpkg -S /bin/echo

And finally you can check to ensure that none of the files of the package has been modified or corrupted by running:

sudo apt install debsums
debsums coreutils

If any of the files are corrupted you can re-install them using:

sudo apt install coreutils --reinstall
1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

David Miller
Author

David Miller

David Miller brings 15 years of experience in global economics, personal finance strategy, and market dynamics. He specializes in turning complex economic trends into actionable insights for everyday readers.