I'm trying to install rustic on Ubuntu based on the directions on their site (Installation - rustic user documentation). It looks like it succeeds but it doesn't run, which makes me suspect there's more configuration which needs to happen. What am I doing wrong?
$ cargo binstall rustic-rs
INFO resolve: Resolving package: 'rustic-rs'
INFO resolve: rustic-rs v0.10.1 is already installed, use --force to override
INFO Done in 1.850856036s
$ rustic
Command 'rustic' not found, did you mean:
command 'restic' from snap restic (0.14.0)
command 'rustc' from snap rustup (1.28.2)
command 'rustc' from deb rustc (1.85.1ubuntu1)
command 'rustc' from deb rustup (1.27.1-3)
command 'restic' from deb restic (0.18.0-1ubuntu1)
See 'snap info <snapname>' for additional versions.
Usually, installing Rust & Cargo adds a line to your shell configuration that adds ~/.cargo/bin to PATH. Did you not restart your shell after installing Cargo? Did the line get added to the wrong file or possibly to no file?
Rust and cargo were either already installed or got installed as a dependency of something else on this vanilla Ubuntu Desktop installation. I only had to install the binstall extension for cargo.
I did try restarting the shell without any effect. And if some defunct shell script got erroneously updated with the PATH command, I haven't found it yet.
That would explain it. ~/.cargo/bin is a directory primarily used by rustup and cargo install and is not usually part of $PATH on any distro if you haven't installed rustup.
Note that if you are planning to develop Rust code, you probably should install rustup (whether from your distro or standalone); distro rustcs are often notably outdated and not as flexible as what rustup can install. Ubuntu even agrees:
Debian includes all of the standard Rust tooling in their archive, including rustc and cargo. Their Rust developer documentation recommends these packages mainly as tools to package other crates for Debian, and instead recommends the rustup package to install toolchains.
…
Additionally, it’s worth noting that the preferred workflow for Rust developers is the rustup Snap package. Like with Debian, the system packages are primarily intended to ensure the availability of Rust within Ubuntu itself, which is less directly relevant to application developers.