cannot execute binary file Linux Origin: Platform & cloud Last updated 13 Oct 2026

cannot execute binary file: Exec format error

The program was built for a different CPU architecture or OS — e.g. an x86_64 binary on an ARM machine (Raspberry Pi, Graviton, Apple Silicon VM).

Exact message you may see cannot execute binary file: Exec format errorcannot execute binary fileExec format error
Seen on: Linux

Meaning

The kernel can’t run machine code for another architecture. Downloading the wrong release asset (amd64 vs arm64), or a macOS/Windows binary on Linux, causes it.

Common causes

  • Wrong architecture download (amd64 on arm64 or vice versa)
  • macOS/Windows binary on Linux
  • 32-bit binary without 32-bit support
  • Corrupted or partial download (HTML error page saved as the binary)

⚡ Quick fix

  1. Check: uname -m and file ./binary
  2. Download the build for your architecture
  3. Re-download and verify the checksum

Detailed fix by platform

Linux

  1. bash
    uname -m
    file ./tool
    curl -LO https://example.com/releases/tool-linux-$(dpkg --print-architecture).tar.gz

How to diagnose

  1. Host arch — uname -m
  2. Binary — file ./tool output
  3. Download — Size/checksum correct?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Platform & cloud. Errors that are often confused with or caused by this one (click to open):

built for iOS, linking for simulator — Building for iOS Simulator, but linking in object file built for iOS, for architecture arm64 (iOS)built for iOS, linkin…error while loading shared libraries — error while loading shared libraries: libX.so.N: cannot open shared object file: No such file or directory (Linux)error while loading s…exec format error — exec /usr/local/bin/docker-entrypoint.sh: exec format error (Docker)exec format errorGLIBC_2.xx not found — /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (Linux)GLIBC_2.xx not foundgrub rescue unknown filesystem — error: unknown filesystem. Entering rescue mode... grub rescue> (Linux)grub rescue unknown f…gzip: stdin: not in gzip format — gzip: stdin: not in gzip format / tar: Error is not recoverable: exiting now (Linux)gzip: stdin: not in g…Illegal instruction — Illegal instruction (core dumped) (SIGILL) (Linux)Illegal instructionKernel panic - VFS: Unable to mount root fs — Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) (Linux)Kernel panic - VFS: U…cannot ex…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.