定位
定位
./app
# bash: ./app: cannot execute binary file: Exec format error
file ./app
uname -m
# 例:file 显示 x86-64 而主机 aarch64 → 架构不匹配处理路径
处理路径
# 1) 获取目标架构产物(优先)
# 2) 源码在本机编译(见 arm-source-compile 条目)
# 3) 脚本类报错则检查 shebang 与换行符:
head -1 script.sh; file script.sh另一种近似报错 bad ELF interpreter 多为解释器路径问题(如 32 位程序缺 32 位库),先用 file 区分两类。