| Previous | Next |
| ELIBACC | EOVERFLOW |
EFTYPE
EFTYPE is a BSD/Darwin error for a file that exists but is not an acceptable type or format for the operation being attempted. It is broader than program loading: the XNU header lists it before the dedicated program-loading errors, so the failing API and the expected kind of object matter.
A filename suffix is not evidence of the file's actual identity. A Mach-O container can represent a relocatable object, an executable, a dynamic library, or a bundle; the Mach-O header records that distinction in its filetype field. A valid object of one kind can still be unsuitable where another kind is required.
Distinguish the nearby Darwin errors
EFTYPEis the general “wrong type or format” result.EBADEXECis a program-loading result for a bad executable image.EBADMACHOidentifies a structurally malformed Mach-O image.EBADARCHmeans that the image has no CPU architecture usable by the loading process.
What to capture
- Record the exact path and the API that rejected it; do not infer the object type from its extension.
- Use
file <path>to identify the container, thenotool -hv <path>andotool -l <path>when it is expected to be Mach-O. - For a universal binary or plugin, inspect its slices with
lipo -archs <path>; format and architecture are separate checks. - When the file came from an application bundle, compare it with the built or signed artifact before replacing anything. Renaming a file does not convert its Mach-O type.
References
- Apple XNU: errno.h
- Apple XNU: Mach-O loader definitions
- Apple: Overview of the Mach-O Executable Format
Looking for a different code? Search another status or error code.
