rustup icon indicating copy to clipboard operation
rustup copied to clipboard

rustup update error: detected conflict

Open Donald2010 opened this issue 1 year ago • 2 comments

I run the commands PS E:\dev> rustc --version rustc 1.74.1 (a28077b28 2023-12-04) PS E:\dev> cargo --version cargo 1.74.1 (ecb9851af 2023-10-18) PS E:\dev> rustup update

after download, it prompts:

nfo: installing component 'rust-std' for 'i686-pc-windows-gnu'
 22.3 MiB /  22.3 MiB (100 %)  12.8 MiB/s in  2s ETA:  0s
info: installing component 'rust-std' for 'i686-pc-windows-msvc'
 18.1 MiB /  18.1 MiB (100 %)  12.4 MiB/s in  1s ETA:  0s
info: installing component 'rust-src'
info: rolling back changes
error: failed to install component: 'rust-src', detected conflict: 'lib/rustlib\manifest-rust-src'
info: checking for self-update

  stable-x86_64-pc-windows-gnu update failed - rustc 1.74.1 (a28077b28 2023-12-04)

info: cleaning up downloads & tmp directories.

what should I do to update ?

Donald2010 avatar Aug 19 '24 08:08 Donald2010

So this is basically saying that something already exists at the path that it's trying to install the new toolchain's rust-src component too. Perhaps you (inadvertently) installed a newer toolchain already through some other method? What does rustup toolchain list -v say?

djc avatar Aug 19 '24 09:08 djc

PS E:\dev> rustup toolchain list -v stable-x86_64-pc-windows-gnu (default) C:\Users\My\.rustup\toolchains\stable-x86_64-pc-windows-gnu

I installed Rust quite a time ago, and can't remember clearly, but maybe it has something todo with MSYS2 installed earlier ?

Donald2010 avatar Aug 20 '24 13:08 Donald2010