rustup: Fresh install on macos can't install rustfmt and clippy using rustup
Following the instructions in https://beta.rust-lang.org/learn/get-started I ran the commands:
rustup add component rustfmt and rustup add component clippy and got the following errors:
error: toolchain 'stable-x86_64-apple-darwin' does not contain component 'rustfmt' for target 'x86_64-apple-darwin'
and
error: toolchain 'stable-x86_64-apple-darwin' does not contain component 'clippy' for target 'x86_64-apple-darwin'
I am new to the community, so apologies if this has an obvious explanation.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 25
- Comments: 24 (8 by maintainers)
Commits related to this issue
- Update travis.yml Resoves issues related to https://github.com/rust-lang/rustup.rs/issues/1558 — committed to tari-project/tari by CjS77 5 years ago
- Update travis.yml (#23) Resoves issues related to https://github.com/rust-lang/rustup.rs/issues/1558 — committed to tari-project/tari by CjS77 5 years ago
- Add magic code https://github.com/rust-lang/rustup.rs/issues/1558 — committed to dorayakikun/pixelmatch-rs by dorayakikun 5 years ago
- Set up CI with Azure Pipelines (#3) * Set up CI with Azure Pipelines * Fix Pipeline Settings * Add magic code https://github.com/rust-lang/rustup.rs/issues/1558 * fix: Remove nightly tool... — committed to dorayakikun/pixelmatch-rs by dorayakikun 5 years ago
But:
But still does not work with “stable”:
EDIT:
fixed the problem.
FWIW I had to run the following to get to a working state.
I’m seeing the same issue on macOS 10.12.
I did
rustup self updateand here is the output of-VAnd here is the output of
rustfmt component listWhat happens if you then
rustup component add --toolchain nightly rustfmt || rustup component add --toolchain nightly clippy? On my system, I get:Which makes sense, given that both rustfmt and clippy are missing from today’s nightly according to https://mexus.github.io/rustup-components-history/x86_64-apple-darwin.html.
No luck with
rustup self update. By the way the same problem arose on a Ubuntu 18.04.1 LTS box:As for the beta and nightly toolchains, is the documentation at https://beta.rust-lang.org/ supposed to work only with those? I think the website should explicitly mention it, because the wording suggests that the only beta is the website, not the tooling.
I could also fix this issue by removing and adding stable again.
@jxub I think you just need to re-install cargo-clippy via
rustup component add clippy.Had the same issue with rustc 1.33.0 on Darwin (macos Mojave) and fish shell.
Following the consensus (
rustup toolchain remove nightly && rustup toolchain add nightly) from the comments above seems to fail, so I guess what does apply to nightly applies to 1.33 as well.Indeed, it’s unrelated. My issue is that clippy is actually unavailable for today’s nightly, per https://mexus.github.io/rustup-components-history/x86_64-apple-darwin.html.
Could you try running
rustup self updateand then try again please? You’ll also need to try on eitherr beta or nightly toolchains, not stable.