Use the package's lockfile when installing.
Section: Install binary crates
Honor the package lockfile
bash
bash
cargo install --locked ripgrepExplanation
Common when you want installation to match the published lockfile.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Install binary crates
Install directly from git
Build and install a binary crate from a repository.
Remove an installed binary crate
Delete binaries installed by `cargo install`.