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

Fresh install on macos can't install rustfmt and clippy using rustup #1558

Open
StefPac opened this Issue Dec 3, 2018 · 15 comments

Comments

Projects
None yet
@StefPac
Copy link

StefPac commented Dec 3, 2018

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.

@nrc

This comment has been minimized.

Copy link
Member

nrc commented Dec 3, 2018

Could you try running rustup self update and then try again please? You'll also need to try on eitherr beta or nightly toolchains, not stable.

@StefPac

This comment has been minimized.

Copy link

StefPac commented Dec 4, 2018

No luck with rustup self update. By the way the same problem arose on a Ubuntu 18.04.1 LTS box:

error: toolchain 'stable-x86_64-unknown-linux-gnu' does not contain component 'rustfmt' for target 'x86_64-unknown-linux-gnu'

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.

@tspiteri

This comment has been minimized.

Copy link

tspiteri commented Dec 6, 2018

I don't know if it's related, but on Windows running rustup self update will say it's downloading, then say that it's successfully updated to 1.14.0, which is the version I get with rustup -V. Running rustup self update again repeats the cycle.

On GNU/Linux, rustup self update did update to 1.15.0. (I did this a few days ago, so I don't know if something has changed since.)

@nrc

This comment has been minimized.

Copy link
Member

nrc commented Dec 6, 2018

There were distribution problems with rustup on Windows, they're currently being addressed, so hopefully this should be resolved today.

@rhysd

This comment has been minimized.

Copy link

rhysd commented Dec 7, 2018

I'm seeing the same issue on macOS 10.12.

error: toolchain 'stable-x86_64-apple-darwin' does not contain component 'rustfmt' for target 'x86_64-apple-darwin'

I did rustup self update and here is the output of -V

rustup 1.16.0 (beab5ac2b 2018-12-06)

And here is the output of rustfmt component list

cargo-x86_64-apple-darwin (default)
clippy-preview-x86_64-apple-darwin (installed)
lldb-preview-x86_64-apple-darwin
llvm-tools-preview-x86_64-apple-darwin
rls-preview-x86_64-apple-darwin
rust-analysis-x86_64-apple-darwin
rust-docs-x86_64-apple-darwin (default)
rust-src
rust-std-aarch64-apple-ios
rust-std-aarch64-fuchsia
rust-std-aarch64-linux-android
rust-std-aarch64-unknown-cloudabi
rust-std-aarch64-unknown-linux-gnu
rust-std-aarch64-unknown-linux-musl
rust-std-arm-linux-androideabi
rust-std-arm-unknown-linux-gnueabi
rust-std-arm-unknown-linux-gnueabihf
rust-std-arm-unknown-linux-musleabi
rust-std-arm-unknown-linux-musleabihf
rust-std-armebv7r-none-eabi
rust-std-armebv7r-none-eabihf
rust-std-armv5te-unknown-linux-gnueabi
rust-std-armv5te-unknown-linux-musleabi
rust-std-armv7-apple-ios
rust-std-armv7-linux-androideabi
rust-std-armv7-unknown-cloudabi-eabihf
rust-std-armv7-unknown-linux-gnueabihf
rust-std-armv7-unknown-linux-musleabihf
rust-std-armv7r-none-eabi
rust-std-armv7r-none-eabihf
rust-std-armv7s-apple-ios
rust-std-asmjs-unknown-emscripten
rust-std-i386-apple-ios
rust-std-i586-pc-windows-msvc
rust-std-i586-unknown-linux-gnu
rust-std-i586-unknown-linux-musl
rust-std-i686-apple-darwin
rust-std-i686-linux-android
rust-std-i686-pc-windows-gnu
rust-std-i686-pc-windows-msvc
rust-std-i686-unknown-cloudabi
rust-std-i686-unknown-freebsd
rust-std-i686-unknown-linux-gnu
rust-std-i686-unknown-linux-musl
rust-std-mips-unknown-linux-gnu
rust-std-mips-unknown-linux-musl
rust-std-mips64-unknown-linux-gnuabi64
rust-std-mips64el-unknown-linux-gnuabi64
rust-std-mipsel-unknown-linux-gnu
rust-std-mipsel-unknown-linux-musl
rust-std-powerpc-unknown-linux-gnu
rust-std-powerpc-unknown-linux-gnuspe
rust-std-powerpc64-unknown-linux-gnu
rust-std-powerpc64le-unknown-linux-gnu
rust-std-powerpc64le-unknown-linux-musl
rust-std-riscv32imac-unknown-none-elf
rust-std-riscv32imc-unknown-none-elf
rust-std-s390x-unknown-linux-gnu
rust-std-sparc-unknown-linux-gnu
rust-std-sparc64-unknown-linux-gnu
rust-std-sparcv9-sun-solaris
rust-std-thumbv6m-none-eabi
rust-std-thumbv7em-none-eabi
rust-std-thumbv7em-none-eabihf
rust-std-thumbv7m-none-eabi
rust-std-wasm32-unknown-emscripten
rust-std-wasm32-unknown-unknown
rust-std-x86_64-apple-darwin (default)
rust-std-x86_64-apple-ios
rust-std-x86_64-fuchsia
rust-std-x86_64-linux-android
rust-std-x86_64-pc-windows-gnu
rust-std-x86_64-pc-windows-msvc
rust-std-x86_64-rumprun-netbsd
rust-std-x86_64-sun-solaris
rust-std-x86_64-unknown-cloudabi
rust-std-x86_64-unknown-freebsd
rust-std-x86_64-unknown-hermit
rust-std-x86_64-unknown-linux-gnu
rust-std-x86_64-unknown-linux-gnux32
rust-std-x86_64-unknown-linux-musl
rust-std-x86_64-unknown-netbsd
rust-std-x86_64-unknown-redox
rustc-x86_64-apple-darwin (default)
rustfmt-preview-x86_64-apple-darwin
@danpker

This comment has been minimized.

Copy link

danpker commented Dec 7, 2018

This is also preventing the removal of clippy-preview

rustup component remove clippy-preview-x86_64-apple-darwin
error: toolchain 'stable-x86_64-apple-darwin' does not contain component 'clippy-preview-x86_64-apple-darwin' for target 'x86_64-apple-darwin'
@rom1v

This comment has been minimized.

Copy link

rom1v commented Dec 7, 2018

$ rustup update
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: checking for self-updates

  stable-x86_64-unknown-linux-gnu unchanged - rustc 1.31.0 (abe02cefd 2018-12-04)

$ rustup -V
rustup 1.16.0 (beab5ac2b 2018-12-06)
$ rustup self update
info: checking for self-updates
$ rustup -V
rustup 1.16.0 (beab5ac2b 2018-12-06)
$ rustup default stable
info: using existing install for 'stable-x86_64-unknown-linux-gnu'
info: default toolchain set to 'stable-x86_64-unknown-linux-gnu'

  stable-x86_64-unknown-linux-gnu unchanged - rustc 1.31.0 (abe02cefd 2018-12-04)

$ rustup component add rustfmt
error: toolchain 'stable-x86_64-unknown-linux-gnu' does not contain component 'rustfmt' for target 'x86_64-unknown-linux-gnu'

But:

$ rustup default 1.31.0
info: using existing install for '1.31.0-x86_64-unknown-linux-gnu'
info: default toolchain set to '1.31.0-x86_64-unknown-linux-gnu'

  1.31.0-x86_64-unknown-linux-gnu unchanged - rustc 1.31.0 (abe02cefd 2018-12-04)

$ rustup component add rustfmt
info: downloading component 'rustfmt'
  3.2 MiB /   3.2 MiB (100 %)   1.1 MiB/s ETA:   0 s                 
info: installing component 'rustfmt'

But still does not work with "stable":

$ rustup default stable
info: using existing install for 'stable-x86_64-unknown-linux-gnu'
info: default toolchain set to 'stable-x86_64-unknown-linux-gnu'

  stable-x86_64-unknown-linux-gnu unchanged - rustc 1.31.0 (abe02cefd 2018-12-04)

$ rustup component add rustfmt
error: toolchain 'stable-x86_64-unknown-linux-gnu' does not contain component 'rustfmt' for target 'x86_64-unknown-linux-gnu'

EDIT:

rustup toolchain remove stable && rustup toolchain add stable

fixed the problem.

@rhysd

This comment has been minimized.

Copy link

rhysd commented Dec 7, 2018

I could also fix this issue by removing and adding stable again.

@yim7

This comment has been minimized.

Copy link

yim7 commented Dec 7, 2018

Thanks

@asomers

This comment has been minimized.

Copy link

asomers commented Dec 8, 2018

clippy and rustfmt are also missing for x86_64-unknown-freebsd:

error: component 'rustfmt' for target 'x86_64-unknown-freebsd' is unavailable for download
@bspeice

This comment has been minimized.

Copy link

bspeice commented Dec 9, 2018

Had a lot of jobs in Travis start failing recently because of this too: https://travis-ci.org/bspeice/qadapt/jobs/465480502

@u2 u2 referenced this issue Dec 14, 2018

Merged

fix: fmt & clippy #16

CjS77 added a commit to tari-project/tari that referenced this issue Jan 7, 2019

Update travis.yml
Resoves issues related to rust-lang/rustup.rs#1558

@CjS77 CjS77 referenced this issue Jan 7, 2019

Merged

Update travis.yml #23

1 of 2 tasks complete

CjS77 added a commit to tari-project/tari that referenced this issue Jan 7, 2019

Update travis.yml (#23)
Resoves issues related to rust-lang/rustup.rs#1558
@rubberduck203

This comment has been minimized.

Copy link

rubberduck203 commented Jan 7, 2019

FWIW I had to run the following to get to a working state.

rustup toolchain remove stable && rustup toolchain install stable
@mass10

This comment has been minimized.

Copy link

mass10 commented Jan 14, 2019

FWIW I had to run the following to get to a working state.

rustup toolchain remove stable && rustup toolchain install stable

This worked for me. Thank you!

@dherman dherman referenced this issue Jan 17, 2019

Closed

rustfmt #243

@mykmelez

This comment has been minimized.

Copy link

mykmelez commented Jan 28, 2019

clippy and rustfmt are also missing for x86_64-unknown-freebsd:

error: component 'rustfmt' for target 'x86_64-unknown-freebsd' is unavailable for download

I see this with clippy on nightly x86_64-apple-darwin:

> rustup component add --toolchain nightly clippy
error: component 'clippy' for target 'x86_64-apple-darwin' is unavailable for download

However, I don't see it with rustfmt:

> rustup component add --toolchain nightly rustfmt
info: component 'rustfmt' for target 'x86_64-apple-darwin' is up to date

Regardless, it isn't unclear that it's the same issue, since this issue was originally that the stable toolchain "does not contain component", whereas this error message says it's "unavailable for download."

@mykmelez

This comment has been minimized.

Copy link

mykmelez commented Jan 28, 2019

Regardless, it isn't unclear that it's the same issue, since this issue was originally that the stable toolchain "does not contain component", whereas this error message says it's "unavailable for download."

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment