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

rustup update failing with could not rename component file #2729

Closed
spastorino opened this issue Apr 23, 2021 · 11 comments
Closed

rustup update failing with could not rename component file #2729

spastorino opened this issue Apr 23, 2021 · 11 comments

Comments

@spastorino
Copy link
Member

[santiago@galago ~]$ rustup --version
rustup 1.23.1 (2020-12-18)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.53.0-nightly (b84932674 2021-04-21)`

[santiago@galago ~]$ rustup update
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: syncing channel updates for 'beta-x86_64-unknown-linux-gnu'
info: syncing channel updates for 'nightly-x86_64-unknown-linux-gnu'
info: latest update on 2021-04-23, rust version 1.53.0-nightly (7f4afdf02 2021-04-22)
info: downloading component 'rust-std' for 'i686-unknown-linux-gnu'
info: downloading component 'rustc-dev'
 95.0 MiB /  95.0 MiB (100 %)  36.6 MiB/s in  2s ETA:  0s
info: downloading component 'rust-src'
info: downloading component 'rust-analyzer-preview'
info: downloading component 'rust-analysis'
info: downloading component 'rls'
info: downloading component 'miri'
info: downloading component 'llvm-tools-preview'
info: downloading component 'cargo'
info: downloading component 'clippy'
info: downloading component 'rust-docs'
info: downloading component 'rust-std'
info: downloading component 'rustc'
 48.8 MiB /  48.8 MiB (100 %)  36.8 MiB/s in  1s ETA:  0s
info: downloading component 'rustfmt'
info: removing previous version of component 'rust-std' for 'i686-unknown-linux-gnu'
info: removing previous version of component 'rustc-dev'
info: removing previous version of component 'rust-src'
info: removing previous version of component 'rust-analyzer-preview'
info: removing previous version of component 'rust-analysis'
info: removing previous version of component 'rls'
info: removing previous version of component 'miri'
info: removing previous version of component 'llvm-tools-preview'
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 'rust-std' for 'i686-unknown-linux-gnu'
info: using up to 500.0 MiB of RAM to unpack components
 24.3 MiB /  24.3 MiB (100 %)  13.0 MiB/s in  2s ETA:  0s
info: installing component 'rustc-dev'
 95.0 MiB /  95.0 MiB (100 %)  13.1 MiB/s in  7s ETA:  0s
info: installing component 'rust-src'
info: installing component 'rust-analyzer-preview'
info: installing component 'rust-analysis'
info: installing component 'rls'
info: installing component 'miri'
info: installing component 'llvm-tools-preview'
 21.4 MiB /  21.4 MiB (100 %)  13.9 MiB/s in  1s ETA:  0s
info: installing component 'cargo'
info: installing component 'clippy'
info: installing component 'rust-docs'
 16.0 MiB /  16.0 MiB (100 %)   9.6 MiB/s in  1s ETA:  0s
info: rolling back changes
error: could not rename component file from '/home/santiago/.rustup/tmp/zf6jna9jd15jb4u__dir/bk' to '/home/santiago/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/share/man'
error: could not rename component file from '/home/santiago/.rustup/tmp/cduhrqr9cfacgp11_dir/bk' to '/home/santiago/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu'
error: could not rename component file from '/home/santiago/.rustup/tmp/df3zlcanlr6x35r5_dir/bk' to '/home/santiago/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/share/zsh'
error: could not rename component file from '/home/santiago/.rustup/tmp/ix1dug784t7aeozn_dir/bk' to '/home/santiago/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/etc'
error: could not rename component file from '/home/santiago/.rustup/tmp/l9rfug8ahze2fpjn_dir/bk' to '/home/santiago/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src'
...
@spastorino spastorino added the bug label Apr 23, 2021
@jyn514
Copy link
Member

jyn514 commented Apr 23, 2021

@spastorino Kinnison said on discord:

This happens if the component file gets corrupted. The easiest fix is to uninstall and reinstall the toolchain.

@rbtcollins
Copy link
Contributor

wheres the actual end of the output? I see the rollback start, but not the actual original error that triggered the rollback.

The could-not-renames are just symptoms of whatever the problem was I think

@spastorino
Copy link
Member Author

ohh yeah I see the problem

error: failed to install component: 'rust-docs-x86_64-unknown-linux-gnu', detected conflict: '"share/doc/rust/html"'

@spastorino
Copy link
Member Author

Uninstalled and installed again and it's now working. Anyway, unsure what happened or how the component file got corrupted.

@rbtcollins
Copy link
Contributor

dup of #2417

@radlyeel
Copy link

Newbie to rust here. Exactly how to "uninstall and reinstall the toolchain", please? This is my year to grok rust and this is my first issue.

@jyn514
Copy link
Member

jyn514 commented Apr 20, 2023

rustup toolchain uninstall stable && rustup toolchain install stable, replacing stable with the toolchain name that errored for you.

@radlyeel
Copy link

Thanks! I'm a pretty goof guesser, but I could've gone a long time before coming up wit that on my own!

@ryanvandelinder
Copy link

what lol ! FR just trying the install again worked smh ugghhhh thanks all lol

@not4rt
Copy link

not4rt commented Oct 12, 2024

Had the exact same problem, fixed by closing the IDE (vscode in my case) hehe

I think rust-analyzer plugin was blocking the folder.

@rami3l
Copy link
Member

rami3l commented Oct 14, 2024

Had the exact same problem, fixed by closing the IDE (vscode in my case) hehe

I think rust-analyzer plugin was blocking the folder.

@not4rt Thanks for the heads up. Given that, I think it'd be better to close this in favor of #2441.

@rami3l rami3l closed this as not planned Won't fix, can't repro, duplicate, stale Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants