Knowledge Base:Chrooting returns exec format error

Synopsis
During the installation of Gentoo Linux, attempting to chroot into the new environment breaks with the following error:

Environment
This article applies to Gentoo Linux installations on an x86_64 platform (amd64 architecture).

Analysis
The error Exec format error means that the binary you are trying to execute is made for a different architecture than the environment you are currently booted from. It usually occurs when you are booted in a 32-bit environment but are trying to install a 64-bit system.

Resolution
Reboot the live environment and pick the right architecture (most LiveCDs support a 64-bit kernel as well, although it is not booted by default). Look for entries labeled gentoo64 or linux64.