Skip to content

Error updating stable to 1.45.0 due to "missing directory" #2426

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

Closed
ararunaufc opened this issue Jul 17, 2020 · 3 comments
Closed

Error updating stable to 1.45.0 due to "missing directory" #2426

ararunaufc opened this issue Jul 17, 2020 · 3 comments
Labels

Comments

@ararunaufc
Copy link

Problem

I tried to update to 1.45.0 right now and rustup reported an error for the "stable" channel part.

The failure seems to be one missing file (although reported as a missing directory) from the step of removing previous "rust-src" component. I attached the full output in the notes section.

Steps

  1. Run rustup update

Possible Solution(s)

I could solve this issue just by touching the reported missing file and trying again.

touch ~/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/io/mod.rs

Notes

Output of the failed rustup update attempt:

~/.../rust/duvidasqxd >>> rustup update                            ±[●][master]
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: latest update on 2020-07-16, rust version 1.45.0 (5c1f21c3b 2020-07-13)
info: downloading component 'rust-std' for 'wasm32-unknown-unknown'
info: downloading component 'rls'
info: downloading component 'rust-src'
info: downloading component 'rust-analysis'
info: downloading component 'cargo'
info: downloading component 'clippy'
info: downloading component 'rust-docs'
 12.2 MiB /  12.2 MiB (100 %)  11.4 MiB/s in  1s ETA:  0s
info: downloading component 'rust-std'
 15.8 MiB /  15.8 MiB (100 %)   9.5 MiB/s in  2s ETA:  0s
info: downloading component 'rustc'
 47.6 MiB /  47.6 MiB (100 %)  10.8 MiB/s in  4s ETA:  0s
info: downloading component 'rustfmt'
info: removing previous version of component 'rust-std' for 'wasm32-unknown-unknown'
info: removing previous version of component 'rls'
info: removing previous version of component 'rust-src'
info: rolling back changes
error: failure removing component 'rust-src', directory does not exist: '"lib/rustlib/src/rust/src/libstd/io/mod.rs"'
info: syncing channel updates for 'nightly-x86_64-unknown-linux-gnu'
info: latest update on 2020-07-17, rust version 1.46.0-nightly (5c9e5df3a 2020-07-16)
info: skipping nightly which is missing installed component 'rustfmt-preview'
info: syncing channel updates for 'nightly-2020-07-16-x86_64-unknown-linux-gnu'
info: latest update on 2020-07-16, rust version 1.46.0-nightly (7e11379f3 2020-07-15)
info: skipping nightly which is missing installed component 'rustfmt-preview'
info: syncing channel updates for 'nightly-2020-07-15-x86_64-unknown-linux-gnu'
info: latest update on 2020-07-15, rust version 1.46.0-nightly (23744c84d 2020-07-14)
info: skipping nightly which is missing installed component 'rustfmt-preview'
info: syncing channel updates for 'nightly-2020-07-14-x86_64-unknown-linux-gnu'
info: syncing channel updates for 'nightly-2020-07-13-x86_64-unknown-linux-gnu'
info: latest update on 2020-07-13, rust version 1.46.0-nightly (9d09331e0 2020-07-12)
info: skipping nightly which is missing installed component 'rustfmt-preview'
info: syncing channel updates for 'nightly-2020-07-12-x86_64-unknown-linux-gnu'
info: latest update on 2020-07-12, rust version 1.46.0-nightly (346aec9b0 2020-07-11)
info: downloading component 'cargo'
info: downloading component 'clippy'
info: downloading component 'rust-docs'
 12.6 MiB /  12.6 MiB (100 %)  10.7 MiB/s in  1s ETA:  0s
info: downloading component 'rust-std'
 16.0 MiB /  16.0 MiB (100 %)   8.0 MiB/s in  1s ETA:  0s
info: downloading component 'rustc'
 48.8 MiB /  48.8 MiB (100 %)  11.6 MiB/s in  4s ETA:  0s
info: downloading component 'rustfmt'
info: removing previous version of component 'cargo'
info: removing previous version of component 'clippy'
info: removing previous version of component 'rust-docs'
info: removing previous version of component 'rust-std'
info: removing previous version of component 'rustc'
info: removing previous version of component 'rustfmt'
info: installing component 'cargo'
info: Defaulting to 500.0 MiB unpack ram
info: installing component 'clippy'
info: installing component 'rust-docs'
 12.6 MiB /  12.6 MiB (100 %)  10.8 MiB/s in  1s ETA:  0s
info: installing component 'rust-std'
 16.0 MiB /  16.0 MiB (100 %)  12.2 MiB/s in  1s ETA:  0s
info: installing component 'rustc'
 48.8 MiB /  48.8 MiB (100 %)  13.4 MiB/s in  3s ETA:  0s
info: installing component 'rustfmt'
info: checking for self-updates

  stable-x86_64-unknown-linux-gnu update failed - rustc 1.44.1 (c7087fe00 2020-06-17)
       nightly-x86_64-unknown-linux-gnu updated - rustc 1.46.0-nightly (346aec9b0 2020-07-11) (from rustc 1.46.0-nightly (daecab3a7 2020-07-10))

info: cleaning up downloads & tmp directories

The following outputs are from after the successful update. I hope they are still relevant to this context...

Output of rustup --version:

rustup 1.22.1 (b01adbbc3 2020-07-08)

Output of rustup show:

Default host: x86_64-unknown-linux-gnu
rustup home:  /home/araruna/.rustup

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

stable-x86_64-unknown-linux-gnu
nightly-x86_64-unknown-linux-gnu

installed targets for active toolchain
--------------------------------------

wasm32-unknown-unknown
x86_64-unknown-linux-gnu

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

stable-x86_64-unknown-linux-gnu (default)
rustc 1.45.0 (5c1f21c3b 2020-07-13)
@ararunaufc ararunaufc added the bug label Jul 17, 2020
@kinnison
Copy link
Contributor

This is a case of a desynchronisation between the stored component manifests and the filesystem contents, which results in our transactional update system being upset. You can "fix" this either as you suggested with the touch or by doing a rustup toolchain uninstall stable && rustup toolchain install stable to remove/reinstall it.

@rbtcollins Do we have a single issue where we're collating this kind of problem?

@rbtcollins
Copy link
Contributor

@kinnison I think marking it as a dup of #2417 would be reasonable.

@kinnison
Copy link
Contributor

Works for me. @ararunaufc this is basically #2417 at its core, so please subscribe to that issue if you want to keep track of when we can solve this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants