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

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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

You Might Also Like