zsh: bad CPU type in executable macOS Origin: Platform & cloud OSI layer 7 · Application Last updated 5 Nov 2026

macOS (Apple Silicon): zsh: bad CPU type in executable: ./tool

You ran an Intel (x86_64) program on an Apple Silicon Mac without Rosetta 2 (or an arm64 binary on an Intel Mac).

Exact message you may see zsh: bad CPU type in executablebad CPU type in executablebash: ./tool: Bad CPU type in executablezsh: bad CPU type in executable: ./toolBad CPU type in executable
Seen on: macOS

Meaning

Install Rosetta with softwareupdate --install-rosetta --agree-to-license or get an arm64 build of the tool. Check the binary with file ./tool / lipo -info. Docker images may need --platform linux/amd64.

Common causes

  • Rosetta 2 not installed
  • x86_64-only binary
  • Running an arm64 build on an Intel Mac
  • Homebrew installed under Rosetta (/usr/local) on an M-series Mac
  • Old toolchain without arm64 support

⚡ Quick fix

  1. softwareupdate --install-rosetta --agree-to-license
  2. Download the arm64/universal build
  3. arch -x86_64 ./tool after Rosetta is installed

Detailed fix by platform

macOS

  1. file ./tool and uname -m (arm64 vs x86_64)

How to diagnose

  1. Binary — file output?
  2. CPU — uname -m?
  3. Rosetta — Installed?

🔧 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):

"x" can't be opened because it is from an unidentified developer — macOS: “app” can’t be opened because it is from an unidentified developer (macOS)"x" can't be opened b…Apple could not verify "x" is free of malware — macOS: “app” cannot be opened because Apple cannot check it for malicious software / Apple could not verify “app” is free of malware that may harm your Mac (macOS)Apple could not verif…Bad configuration option: usekeychain — ssh: /Users/me/.ssh/config: line 5: Bad configuration option: usekeychain (macOS)Bad configuration opt…Camera/Microphone access denied (TCC) — macOS: avfoundation: Could not start capture / "Terminal" does not have access to the camera or microphone — tccd denied (macOS)Camera/Microphone acc…Can't install the software because it is not currently available from the Software Update server — macOS: xcode-select: error: Can't install the software because it is not currently available from the Software Update server (macOS)Can't install the sof…clang: error: unsupported option '-fopenmp' — macOS: clang: error: unsupported option '-fopenmp' (OpenMP with Apple Clang) (macOS)clang: error: unsuppo…codesign: resource fork, Finder information, or similar detritus not allowed — macOS: Error: resource fork, Finder information, or similar detritus not allowed (macOS)codesign: resource fo…dyld: Library not loaded — macOS: dyld[123]: Library not loaded: /usr/local/opt/openssl@1.1/lib/libssl.1.1.dylib — Reason: tried: ... (no such file) (macOS)dyld: Library not loa…zsh: bad …

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.