error: component 'clippy' for target {target} is unavailable for download

616 Views Asked by At

When using a custom rust-toolchain file with a pinned version

1.59.0

and running cargo clippy in 1.59.0, I get

error: the 'cargo-clippy' binary, normally provided by the 'clippy' component, is not applicable to the '1.59.0-aarch64-apple-darwin' toolchain

How do I fix this?

1

There are 1 best solutions below

0
On

This might be due to rustup being corrupted. The surest way to fix this is reinstalling rustup

  • rustup self uninstall
  • Then reinstall it via rustup.rs