Error

"binary not found after cargo install" — How to Fix

Fix the 'binary not found' error by adding the Cargo bin directory to your system PATH environment variable.

The binary is not found because your shell's PATH variable does not include the Cargo bin directory where cargo install places executables. Add the Cargo bin directory to your PATH environment variable and reload your shell configuration.

export PATH="$HOME/.cargo/bin:$PATH"
echo 'export PATH="$HOME/.cargo/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc

For Windows PowerShell, run:

$env:Path += ";$env:USERPROFILE\.cargo\bin"
[System.Environment]::SetEnvironmentVariable("Path", $env:Path, "User")

Restart your terminal and verify the installation with rustc --version.