For Linux, cannot execute Binary file: Exec Format error clearly indicates that it is an execution file format error.
1. Use the wrong command, such as GCC-c hello. c-o hello, and you get a.o file instead of an executable./hello will report the above error! Change to GCC hello. C-o Hello is ok!
2. If not the above error, it may be a version problem, such as the original 32 bit operating system, but the use of 64-bit software, at this time the need is to use the correct version of the software!
A solution to the problem that Cannot execute Binary File is encountered in Linux system,
The problem that cannot execute Binary file is encountered in Linux system is generally caused by the following situations:
- 1.non-root user or non-execute permission
- 2.compilation environment is different (the program is copied from ot
her operating environment)
For the first case, chmod + X program can be chmod +x program by adding execution permissions
In the second case, it is recommended to copy over the binary package of the program and recompile the program. In the actual operation process, I found that when I packaged the entire operating system environment of VPS in the United States and downloaded it to the local server, after unzipping it, the program running it would appear as shown in the question. I was puzzled. The system was all CENTOS5.2, and finally I found that it was caused by the difference between the two compilation environments:
1.The US VPS is the AMD64-bit processor
2.the local server is the Intel 32-bit processor
The hardware compilation environment of the two is different, which causes this problem. Of course, some programs downloaded from the non-binary package, can be executed directly, but the problem is also because the kernel does not match the CPU, Intel is x86, AMD is AMD64 or 32-bit version, corresponding to clear download. I hope this article will be helpful to you.
- FRP installation error:. / FRPC: cannot execute binary file: exec format error
- standard_init_linux.go:211: exec user process caused “exec format error”
- Docker run failed with the following error in logs, standard_ init_ linux.go:211 : exec user process caused “exec format error“
- Failed to execute goal org.codehaus.mojo:exec-maven-plugin:3.0.0:exec (default-cli) on project Hello
- Exec format error: Java
- standard_init_linux.go:178: exec user process caused “no such file or directory”
- Viewing the file system format of disk partition under Linux
- macbook golang zsh: exec format error
- Error response from daemon: OCI runtime exec failed: exec failed: container_linux.go:345:
- insmod: init_module ‘hello.ko’ failed (Exec format error)
- [Linux] solve the error of decompressing JDK on Linux gzip: stdin: not in gzip format
- Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.6.0
- launch failed.Binary Not found in Linux / Ubuntu solution
- Common linux commands — find command’s Exec
- Unknown error: cannot find chrome binary when running selenium under Linux
- PySpark ERROR Shell: Failed to locate the winutils binary in the hadoop binary path
- Linux use ls to view the file color is all white solution, and Linux file color introduction
- How to solve the problem of error 15: file not found when Linux starts
- Linux has no way to solve bash. / that file or directory
- Alpine Linux executable file crash report error / lib / x86 not found_ 64 Linux GNU / libc.so solution