-
Notifications
You must be signed in to change notification settings - Fork 954
rustup update
failing with could not rename component file
#2729
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
Comments
@spastorino Kinnison said on discord:
|
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 |
ohh yeah I see the problem
|
Uninstalled and installed again and it's now working. Anyway, unsure what happened or how the component file got corrupted. |
dup of #2417 |
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. |
|
Thanks! I'm a pretty goof guesser, but I could've gone a long time before coming up wit that on my own! |
what lol ! FR just trying the install again worked smh ugghhhh thanks all lol |
Had the exact same problem, fixed by closing the IDE (vscode in my case) hehe I think rust-analyzer plugin was blocking the folder. |
Rustup will sometimes successfully remove the old toolchain and then repeatedly fail to install it fresh - even when the problem isn't file conflicts. I've had it before and didn't think too much of Not sure if it's better to reopen the existing issue, or to open a new one. After all, the issue title perfectly reflects the actual problem Failing output, ❯ rustup update
info: syncing channel updates for 'stable-x86_64-pc-windows-gnu'
info: latest update on 2025-04-03, rust version 1.86.0 (05f9846f8 2025-03-31)
info: downloading components # snip, this just works
info: removing previous version of components # snip, this just works
# snipping progress reports for brevity
info: installing component 'rust-std' for 'i686-pc-windows-gnu'
info: installing component 'rust-analyzer'
info: installing component 'rust-src'
info: installing component 'cargo'
info: installing component 'clippy'
info: installing component 'rust-docs'
info: installing component 'rust-mingw'
info: installing component 'rust-std'
info: installing component 'rustc'
9 IO-ops / 9 IO-ops (100 %) 2 IOPS in 4s
info: rolling back changes
error: could not rename component file from # snip!
# This repeats for literally every file in $RUSTUP_HOME/tmp downloaded for the current toolchain
# The final bit is interesting, note the ordering:
warn: could not delete temp directory: $RUSTUP_HOME\tmp\gkcvss83zmmb8r11_dir
error: could not rename component file
from '$RUSTUP_HOME\tmp\gkcvss83zmmb8r11_dir\rustc\lib\rustlib\x86_64-pc-windows-gnu\bin\rust-lld.exe'
to '$RUSTUP_HOME\toolchains\stable-x86_64-pc-windows-gnu\lib\rustlib\x86_64-pc-windows-gnu\bin\rust-lld.exe' Subsequent failures happened in the form of a single rename failing instead, or the spurious: There was no IDE running, nothing else touching my Rust install, and just retrying it a couple times eventually leads to success, sort of: edit: formatting fix to prevent sidescrolling |
The text was updated successfully, but these errors were encountered: