PatchELF - Download and setup the PatchELF CLI

by
Jeremy Canfield |
Updated: January 02 2025
| PatchELF articles
Let's use wget to download the patchelf CLI.
wget https://github.com/NixOS/patchelf/releases/download/0.18.0/patchelf-0.18.0-x86_64.tar.gz
Create a temporary directory for patchelf.
mkdir /tmp/patchelf
Extract the tar archive to the temporary directory.
tar -zxpf patchelf-0.18.0-x86_64.tar.gz --directory /tmp/patchelf
The tar file can now be removed.
patchelf-0.18.0-x86_64.tar.gz
And let's verify the patchelf CLI is working.
]# /tmp/patchelf/bin/patchelf --version
patchelf 0.15.0
Let's copy the patchelf CLI to the /usr/local/bin directory.
cp /tmp/patchelf/bin/patchelf /usr/local/bin
The temporary directory can now be removed.
rm -rf /tmp/patchelf
And let's create a symbolic link between /usr/local/bin/patchelf and /usr/local/patchelf.
ln -s /usr/local/bin/patchelf /usr/local/patchelf
Did you find this article helpful?
If so, consider buying me a coffee over at