cargo-clippy command not found
Introduction
When you run more command in linux terminal / console, you get the following error message
cargo-clippy: command not found
or when using sudo you get the following error message
sudo: cargo-clippy: command not found
Solutions to cargo-clippy: command not found
How To Fix cargo-clippy: command not found in Ubuntu / Debian / Kali Linux / Raspbian
In Ubuntu cargo-clippy is provided by rust-clippy package.
rust-clippy is:
Rust is a curly-brace, block-structured expression language. It visually resembles the C language family, but differs significantly in syntactic and semantic details. Its design is oriented toward concerns of “programming in the large”, that is, of creating and maintaining boundaries - both abstract and operational - that preserve large-system integrity, availability and concurrency.
It supports a mixture of imperative procedural, concurrent actor, object-oriented and pure functional styles. Rust also supports generic programming and meta-programming, in both static and dynamic styles.
This package contains ‘clippy’, a linter to catch common mistakes and improve your Rust code as well a collection of over 400 compatible lints.
Lints are divided into categories, each with a default lint level. You can choose how much Clippy is supposed to annoy help you by changing the lint level by category.
Clippy is integrated into the ‘cargo’ build tool, available via ‘cargo clippy’.
To fix this problem, we can install more using the command below.
sudo apt-get -y install rust-clippy
This command might take some time to finish depending on your machine internet connection.
You can also use apt command to install rust-clippy.
sudo apt -y install rust-clippy
Or if you have aptitude installed you can use the following command.
sudo aptitude install rust-clippy
Summary
In this tutorial we learn how to fix cargo-clippy command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.