ELIBBAD
Linux / POSIXERRORNotableProcessHIGH confidence

Accessing a Corrupted Shared Library

Production Risk

Indicates filesystem corruption or failed package installation.

What this means

ELIBBAD (errno 80) is returned by execve() when a required shared library exists and is accessible but has an invalid or corrupted ELF format.

Why it happens
  1. 1Shared library file is corrupted or truncated
  2. 2Wrong architecture (e.g., 32-bit .so loaded by 64-bit binary)
  3. 3Incomplete package installation left a partial .so file
How to reproduce

execve() with a corrupted .so dependency.

trigger — this will error
trigger — this will error
execve("/usr/local/bin/myapp", argv, envp);
// Returns -1, errno = ELIBBAD if .so is corrupted

expected output

execve: Accessing a corrupted shared library (ELIBBAD)

Fix

Verify and reinstall the shared library

WHEN When ELIBBAD is returned on exec

Verify and reinstall the shared library
# Check ELF validity
file /path/to/libmylib.so.1
readelf -h /path/to/libmylib.so.1
# Reinstall the package
apt reinstall libmylib1

Why this works

file and readelf can detect format errors. Reinstalling the package replaces corrupted files.

Sources
Official documentation ↗

Linux Programmer Manual execve(2)

Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev

← All Linux / POSIX errors