The ruplacer utility is a fast command-line text search and replace tool written in Rust that allows developers to find and replace strings across entire repositories while providing an interactive visual diff. In minimal Linux container images, Alpine environments, or freshly installed Debian servers, running ruplacer yields the error bash: ruplacer: command not found because the binary is not part of standard core utilities.
Install ruplacer via Pre-Compiled Static Binary
The quickest way to deploy ruplacer on minimal distributions without setting up Rust build tools is downloading the official pre-compiled release binary:
# Download the latest 64-bit Linux release archive
curl -sSL https://github.com/TankerHQ/ruplacer/releases/latest/download/ruplacer-linux-x86_64.tar.gz -o /tmp/ruplacer.tar.gz
# Extract binary to system binary path
sudo tar -xzf /tmp/ruplacer.tar.gz -C /usr/local/bin/
# Set executable execution permissions
sudo chmod +x /usr/local/bin/ruplacer
# Clean up archive
rm -f /tmp/ruplacer.tar.gz
# Verify installation
ruplacer --version
Install via Cargo Package Manager
If your distribution includes the Rust toolchain, compile and install ruplacer directly from crates.io:
# Install Rust and Cargo if not already present
sudo apt update && sudo apt install -y cargo # On Debian/Ubuntu
# or: apk add cargo # On Alpine Linux
# Install ruplacer into user binary directory
cargo install ruplacer
Export Cargo Binary Directory to Environment PATH
If installing through Cargo succeeds but the shell continues returning command not found, your user path lacks the Cargo bin directory:
- Check if the binary exists in
~/.cargo/bin/ruplacer. - Append the directory to your current shell configuration:
echo 'export PATH="$HOME/.cargo/bin:$PATH"' >> ~/.bashrc source ~/.bashrc - For Zsh environments, append the export command to
~/.zshrcinstead.