How To Install cargo on Rocky Linux 8
Introduction
In this tutorial we learn how to install cargo
on Rocky Linux 8.
What is cargo
Cargo is a tool that allows Rust projects to declare their various dependencies and ensure that you’ll always get a repeatable build.
We can use yum
or dnf
to install cargo
on Rocky Linux 8. In this tutorial we discuss both methods but you only need to choose one of method to install cargo.
Install cargo on Rocky Linux 8 Using dnf
Update yum database with dnf
using the following command.
sudo dnf makecache --refresh
After updating yum database, We can install cargo
using dnf
by running the following command:
sudo dnf -y install cargo
Install cargo on Rocky Linux 8 Using yum
Update yum database with yum
using the following command.
sudo yum makecache --refresh
After updating yum database, We can install cargo
using yum
by running the following command:
sudo yum -y install cargo
How To Uninstall cargo on Rocky Linux 8
To uninstall only the cargo
package we can use the following command:
sudo dnf remove cargo
cargo Package Contents on Rocky Linux 8
/etc/bash_completion.d/cargo
/usr/bin/cargo
/usr/lib/.build-id
/usr/lib/.build-id/86
/usr/lib/.build-id/86/f28517ff83a1e118d3be185040849d1521c297
/usr/share/cargo
/usr/share/cargo/registry
/usr/share/doc/cargo
/usr/share/doc/cargo/README.md
/usr/share/licenses/cargo
/usr/share/licenses/cargo/LICENSE-APACHE
/usr/share/licenses/cargo/LICENSE-MIT
/usr/share/licenses/cargo/LICENSE-THIRD-PARTY
/usr/share/man/man1/cargo-bench.1.gz
/usr/share/man/man1/cargo-build.1.gz
/usr/share/man/man1/cargo-check.1.gz
/usr/share/man/man1/cargo-clean.1.gz
/usr/share/man/man1/cargo-doc.1.gz
/usr/share/man/man1/cargo-fetch.1.gz
/usr/share/man/man1/cargo-fix.1.gz
/usr/share/man/man1/cargo-generate-lockfile.1.gz
/usr/share/man/man1/cargo-help.1.gz
/usr/share/man/man1/cargo-init.1.gz
/usr/share/man/man1/cargo-install.1.gz
/usr/share/man/man1/cargo-locate-project.1.gz
/usr/share/man/man1/cargo-login.1.gz
/usr/share/man/man1/cargo-metadata.1.gz
/usr/share/man/man1/cargo-new.1.gz
/usr/share/man/man1/cargo-owner.1.gz
/usr/share/man/man1/cargo-package.1.gz
/usr/share/man/man1/cargo-pkgid.1.gz
/usr/share/man/man1/cargo-publish.1.gz
/usr/share/man/man1/cargo-run.1.gz
/usr/share/man/man1/cargo-rustc.1.gz
/usr/share/man/man1/cargo-rustdoc.1.gz
/usr/share/man/man1/cargo-search.1.gz
/usr/share/man/man1/cargo-test.1.gz
/usr/share/man/man1/cargo-tree.1.gz
/usr/share/man/man1/cargo-uninstall.1.gz
/usr/share/man/man1/cargo-update.1.gz
/usr/share/man/man1/cargo-vendor.1.gz
/usr/share/man/man1/cargo-verify-project.1.gz
/usr/share/man/man1/cargo-version.1.gz
/usr/share/man/man1/cargo-yank.1.gz
/usr/share/man/man1/cargo.1.gz
/usr/share/zsh/site-functions/_cargo
References
Summary
In this tutorial we learn how to install cargo
on Rocky Linux 8 using yum and dnf.