openshift-install: cannot execute binary file - wrong CPU
You downloaded openshift-install-linux.tar.gz, extracted it, ran ./openshift-install, and
got cannot execute binary file. The file is not corrupt and the mirror is not broken: you
downloaded the build for a different CPU, and the filename gave you no way to know.
Verified against mirror.openshift.com on 2026-11-15.
The trap: four architectures, one filename
The OpenShift mirror is organised by architecture in the directory, not in the filename:
/pub/openshift-v4/x86_64/clients/ocp/stable/openshift-install-linux-5.0.1.tar.gz 443.8 MB
/pub/openshift-v4/aarch64/clients/ocp/stable/openshift-install-linux-5.0.1.tar.gz 388.8 MB
/pub/openshift-v4/ppc64le/clients/ocp/stable/openshift-install-linux-5.0.1.tar.gz 392.3 MB
/pub/openshift-v4/s390x/clients/ocp/stable/openshift-install-linux-5.0.1.tar.gz 454.4 MB
The filename is byte-for-byte identical in all four directories; the sizes differ, which is the only visible signal that they are four different binaries.
So the question is not "did I get the right file" but "which directory was I in when I clicked". If you were browsing the aarch64 tree on an x86-64 workstation — or a search result dropped you there — you have an ARM binary and a perfectly correct error message.
Three commands to confirm
$ uname -m
x86_64 # what this machine is
$ file ./openshift-install
ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV),
statically linked, Go BuildID=... # what the binary is
Machine in the header is the answer. For reference:
file says |
Runs on |
|---|---|
x86-64 |
Intel / AMD 64-bit |
ARM aarch64 |
ARM 64-bit servers, Apple Silicon VMs, Raspberry Pi 4/5 |
64-bit PowerPC |
ppc64le |
IBM S/390 |
s390x |
Third check, if you want the ELF identity directly:
readelf -h ./openshift-install | grep Machine
# Machine: Advanced Micro Devices X86-64 <- or AArch64, or PowerPC64
Note: openshift-install is a statically linked Go binary. That rules out the other
common cause of this message — a libc mismatch — because there is no interpreter to miss.
For a static binary, the architecture is the only thing that can make the kernel refuse it.
The fix
Re-download from the directory that matches uname -m:
# on an x86-64 host
curl -LO https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/stable/openshift-install-linux.tar.gz
# on ARM
curl -LO https://mirror.openshift.com/pub/openshift-v4/aarch64/clients/ocp/stable/openshift-install-linux.tar.gz
Then verify before you run it — one second, and it prevents a second 400 MB download:
file ./openshift-install | grep -q "$(uname -m | sed 's/x86_64/x86-64/;s/aarch64/aarch64/')" \
&& echo "architecture matches" || echo "wrong build"
The same rule applies to the whole client set: oc, kubectl, and openshift-install
are all published per architecture under the same clients/ocp/<version>/<arch>/ layout.
Mixed tools on one workstation is a common cause of "it worked yesterday": someone updated
oc from a different directory.
Why copying the binary from another machine fails
Copying openshift-install from an ARM jump host to an x86-64 bastion copies the
architecture with it. This works only with emulation:
# user-space emulation, slow but functional for a CLI
sudo apt-get install -y qemu-user-static
sudo update-binfmts --enable qemu-aarch64
For an installer that runs for 30–45 minutes and talks to the cluster API, emulation is the wrong answer: download the native build. Emulation is for containers and tests, not for the tool you use to create production clusters.
What does not help
| Attempt | Why it fails |
|---|---|
chmod +x openshift-install |
Permission was never the problem; the kernel rejected the contents |
sudo ./openshift-install |
The kernel does not check who you are |
| Copying a loader from another machine | Static binary — there is no loader to fix |
| Re-extracting the tarball | The bytes were fine; the build was for the wrong CPU |
Checklist
uname -m— what am I on?- Check the mirror directory you downloaded from, not the filename.
file ./openshift-installbefore the first run.- Keep
oc,kubectlandopenshift-installfrom the same architecture tree. - In scripts, assert the architecture before invoking the installer.
Paste the binary into ELF Inspector if you want the header read in the browser — it shows the machine type and whether the binary is static in one screen.
Mirror names and sizes verified with HEAD requests on 2026-11-15 against mirror.openshift.com. The architecture check outputs above are from a real x86-64 host.