Linux – How to Resolve ‘Cannot Execute Binary File’ Error

bashdebianlinuxssh

When I login using SSH, all I can see is this…

-bash: /usr/bin/id: cannot execute binary file
-bash: [: : integer expression expected

I couldn't do anything in here. Commands such as halt, poweroff, reboot will return command not found.

How can I fix this? I am using Debian Squeeze Linux

Best Answer

Usually that error message means Linux doesn't recognize the file as a shell script or as an executable file.

Typically the cause is running an executable on the wrong architecture - if you try to run x86 executables on an ARM CPU, this message comes up.

Did /usr/bin/id get overwritten, possibly?

Related Question