Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to install on Rust 1.31.0 with rustup #3503

Closed
ashthespy opened this issue Dec 6, 2018 · 15 comments
Closed

Unable to install on Rust 1.31.0 with rustup #3503

ashthespy opened this issue Dec 6, 2018 · 15 comments
Labels
C-bug Category: Clippy is not doing the correct thing

Comments

@ashthespy
Copy link

Don't seem be to be able to install clippy via rustup.

C:\Users\Ash> rustup show
Default host: x86_64-pc-windows-msvc

stable-x86_64-pc-windows-msvc (default)
rustc 1.31.0 (abe02cefd 2018-12-04)
C:\Users\Ash> rustup component add clippy
error: toolchain 'stable-x86_64-pc-windows-msvc' does not contain component 'clippy' for target 'x86_64-pc-windows-msvc'
@Manishearth
Copy link
Member

Manishearth commented Dec 6, 2018 via email

@nrc
Copy link
Member

nrc commented Dec 6, 2018

could you try rustup self update and then try re-installing please?

@ashthespy
Copy link
Author

No luck:

C:\Users\Ash> rustup self update
info: checking for self-updates
info: downloading self-update
info: rustup updated successfully to 1.14.0
C:\Users\Ash> rustup component add clippy
error: toolchain 'stable-x86_64-pc-windows-msvc' does not contain component 'clippy' for target 'x86_64-pc-windows-msvc'

@mati865
Copy link
Contributor

mati865 commented Dec 6, 2018

rustup component add clippy-preview will work.

@alexcrichton
Copy link
Member

I've found the issue and am working on it!

@fominok
Copy link

fominok commented Dec 6, 2018

Same for x86_64-unknown-linux-gnu

@phansch phansch added C-bug Category: Clippy is not doing the correct thing and removed O-windows labels Dec 6, 2018
@ashthespy ashthespy changed the title Unable to install on Rust 1.31.0 with rustup (Windows) Unable to install on Rust 1.31.0 with rustup Dec 6, 2018
@ashthespy
Copy link
Author

ashthespy commented Dec 6, 2018

After the last comment just checked on WSL, and can confirm it's the same for stable-x86_64-unknown-linux-gnu as well (rustup 1.16.0)

EDIT: just updated to 1.16.0 on Win10 box as well, but still have the same issue

@yoursvivek
Copy link

Same for clippy on x86_64-apple-darwin. rustfmt too.

~ $ rustup component add clippy
error: toolchain 'stable-x86_64-apple-darwin' does not contain component 'clippy' for target 'x86_64-apple-darwin'
~ $ rustup component add rustfmt
error: toolchain 'stable-x86_64-apple-darwin' does not contain component 'rustfmt' for target 'x86_64-apple-darwin'
~ $ rustup component list | grep -e clippy -e rustfmt
clippy-preview-x86_64-apple-darwin
rustfmt-preview-x86_64-apple-darwin
~ $ rustup show 
Default host: x86_64-apple-darwin

installed toolchains
--------------------

stable-x86_64-apple-darwin (default)
nightly-x86_64-apple-darwin

active toolchain
----------------

stable-x86_64-apple-darwin (default)
rustc 1.31.0 (abe02cefd 2018-12-04)

@CryZe
Copy link

CryZe commented Dec 7, 2018

The solution is to completely wipe your toolchain and reinstall it.

@ianthetechie
Copy link

@CryZe that's one heck of a solution, but I can confirm it worked for me on macOS Mojave. rustup self uninstall is the way to uninstall btw.

@taeguk
Copy link

taeguk commented Dec 7, 2018

I solved this problem with following way.

  1. rustup self uninstall
  2. Download and install lastest rustup-init (rustup >= 1.16.0) in https://rustup.rs/
    • "Installing older rustup-init. And performing rustup self update" can't solve the problem. You must install lastest rustup-init at first time.
  3. Successfully rustup component add clippy and rustup component add rustfmt!

@phansch
Copy link
Member

phansch commented Dec 19, 2018

Thanks everyone for the workarounds! I'm going to go ahead and close this issue, as it's not directly in the power of Clippy to fix this. Although not ideal, the above workarounds should work if you're running into the problem 💟

@phansch phansch closed this as completed Dec 19, 2018
@liamdawson
Copy link

This bit me, and I suspect it could bite others too (I almost opened an issue). Maybe add a note to the readme around the install instructions?

@maddiemort
Copy link

I just had to do this (run rustup self uninstall and then reinstall) in order to be able to install clippy on stable, after being able to install it on nightly and attempting to fix it on stable by running rustup self update, which didn't work.

@wimblemine
Copy link

  • rustup self uninstall

Solved my problem on WSL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: Clippy is not doing the correct thing
Projects
None yet
Development

No branches or pull requests