patchelf
« Back to VersTracker
Description:
Modify dynamic ELF executables
Type: Formula  |  Latest Version: 0.18.0@0  |  Tracked Since: Dec 24, 2025
Links: Homepage  |  GitHub  |  formulae.brew.sh
Stars: 4,108  |  Forks: 515  |  Language: C  |  Category: System utilities
Tags: elf binary linker rpath packaging linux
Install: brew install patchelf
About:
Patchelf is a command-line utility for modifying existing ELF (Executable and Linkable Format) binaries. It allows users to change the dynamic loader (interpreter) and adjust the RPATH/RUNPATH of executables and shared libraries, which is essential for relocating binaries and fixing library dependencies in Linux environments.
Key Features:
  • Change the dynamic loader (interpreter) of ELF binaries
  • Modify the RPATH and RUNPATH to control library search paths
  • Remove or add declared dependencies on dynamic libraries (DT_NEEDED)
  • Shrink RPATH by removing redundant entries
Use Cases:
  • Packaging and relocating software for distribution (e.g., in Nix/Guix)
  • Fixing broken binaries with incorrect library paths
  • Creating self-contained application bundles for deployment
Alternatives:
  • chrpath – Only modifies RPATH/RUNPATH, cannot change the dynamic loader or DT_NEEDED entries
  • elfedit – Part of binutils, more low-level and complex for simple path modifications
Version History
Detected Version Rev Change Commit
Dec 24, 2025 11:04am 0.18.0 0 VERSION_BUMP f5b03ab9