Rustup Update from 1.32.x to 1.41 fails

Hello,
All throughout today, i have been trying to update rust to the lastest version in other to use Maybeuninit.
I used Visual code terminal twice to run rustup update but got this error:

ncis\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib/rustlib/x86_64-pc-windows-msvc/bin'
error: failed to install component: 'rls-preview-x86_64-pc-windows-msvc', detected conflict: '"bin/rls.exe"'
info: checking for self-updates
info: downloading self-update

  stable-x86_64-pc-windows-msvc update failed - rustc 1.32.0 (9fda7c223 2019-01-16)

 error: could not remove 'rustup-bin' file: '...\.cargo\bin\rustup.exe'

error: caused by: Access is denied. (os error 5)

Wild guess: you are running this from VS Code, and probably VS Code runs rls in the background. IIRC, on windows one can't remove a binary for a program which is currently running. Try running rustup update from cmd.exe outside of VS Code?

1 Like

I did do that, and the same error occurred while VS Code is open with rust editor.
Let me try closing it and see the result.

After closing VS code editor. I still get error, the update failed.

error: could not rename component file from '...\.rustup\tmp\caqzfvs0l7njt1h0_dir\bk' to '...\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib/rustlib/x86_64-pc-windows-msvc/bin'
error: failed to install component: 'rls-preview-x86_64-pc-windows-msvc', detected conflict: '"bin/rls.exe"'
info: checking for self-updates

  stable-x86_64-pc-windows-msvc update failed - rustc 1.32.0 (9fda7c223 2019-01-16)

info: cleaning up downloads & tmp directories

Try removing rls-preview component before updating. Looks like you current version is from the times when RLS wasn't stable yet.

how do i run that command?
Should i do rustup rls-preview or use rustc rls-preview

I tried both and got error.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.