toolchain: nightly-x86_64-pc-windows-msvc
here is the log:
error: could not rename component directory from 'C:\Users\francek.rustup\tmp\pewpan3stlkl1g0c_dir\bk' to 'C:\Users\francek.rustup\toolchains\nightly-x86_64-pc-windows-msvc\share/zsh'
error: could not rename component directory from 'C:\Users\francek.rustup\tmp\bdzmxklyrc405dgw_dir\bk' to 'C:\Users\francek.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib/rustlib/x86_64-pc-windows-msvc/codegen-backends'
error: failed to install component: 'rust-docs-x86_64-pc-windows-msvc', detected conflict: '"share/doc/rust/html"'
I've been having a similar issue; uninstalled nightly completely and am now without:
C:\Users\Christopher>rustup toolchain install nightly
info: syncing channel updates for 'nightly-x86_64-pc-windows-msvc'
info: latest update on 2018-06-22, rust version 1.28.0-nightly (662c70a59 2018-06-21)
info: downloading component 'rustc'
error: failed to parse url: 1.28.0-nightly (662c70a59 2018-06-21)/2018-06-22/rustc-nightly-x86_64-pc-windows-msvc.tar.xz
info: caused by: relative URL without a base
See https://github.com/rust-lang-nursery/rustup.rs/issues/1443#issuecomment-399349175:
It's Rust build system issue and should be tracked in main repo: rust-lang/rust#51699
This still doesn't work.
C:\WINDOWS\system32>rustup toolchain install nightly
info: syncing channel updates for 'nightly-x86_64-pc-windows-msvc'
info: latest update on 2018-07-14, rust version 1.29.0-nightly (254f8796b 2018-07-13)
info: downloading component 'rustc'
info: downloading component 'rust-std'
info: downloading component 'cargo'
info: downloading component 'rust-docs'
info: installing component 'rustc'
info: installing component 'rust-std'
info: installing component 'cargo'
info: installing component 'rust-docs'
info: rolling back changes
error: could not rename component file from 'C:\Users\jpriest\.rustup\tmp\uv9ozudt9npufkpb_dir\bk' to 'C:\Users\jpriest\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\etc'
error: could not rename component file from 'C:\Users\jpriest\.rustup\tmp\zwha5_abydtsmzts_dir\bk' to 'C:\Users\jpriest\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\etc/bash_completion.d'
error: could not rename component file from 'C:\Users\jpriest\.rustup\tmp\0i6uun470h52n8vl_dir\bk' to 'C:\Users\jpriest\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\share/zsh'
error: could not rename component file from 'C:\Users\jpriest\.rustup\tmp\q_0zk4v_s9nz7_j8_dir\bk' to 'C:\Users\jpriest\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\share/zsh/site-functions'
error: could not rename component file from 'C:\Users\jpriest\.rustup\tmp\9v4ph3_86bcpsxbv_dir\bk' to 'C:\Users\jpriest\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\share/man'
error: could not rename component file from 'C:\Users\jpriest\.rustup\tmp\32v99z_l4ioc_fpq_dir\bk' to 'C:\Users\jpriest\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\share/man/man1'
error: could not rename component file from 'C:\Users\jpriest\.rustup\tmp\o191388x6585o1n8_dir\bk' to 'C:\Users\jpriest\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\bin'
error: could not rename component file from 'C:\Users\jpriest\.rustup\tmp\znop56z0wqpt3d6l_dir\bk' to 'C:\Users\jpriest\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\share/doc/cargo'
error: could not rename component file from 'C:\Users\jpriest\.rustup\tmp\8juasnvtcnqs3uyj_dir\bk' to 'C:\Users\jpriest\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib/rustlib/x86_64-pc-windows-msvc'
error: could not rename component file from 'C:\Users\jpriest\.rustup\tmp\lg5zj85t3inevhl8_dir\bk' to 'C:\Users\jpriest\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib/rustlib/x86_64-pc-windows-msvc/lib'
error: could not rename component file from 'C:\Users\jpriest\.rustup\tmp\ei5nuabtp_jyjtyj_dir\bk' to 'C:\Users\jpriest\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib/rustlib/x86_64-pc-windows-msvc/codegen-backends'
error: could not rename component file from 'C:\Users\jpriest\.rustup\tmp\e6x6edwh2p34lg9s_dir\bk' to 'C:\Users\jpriest\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib/rustlib/etc'
error: could not rename component file from 'C:\Users\jpriest\.rustup\tmp\ti8jf1ui012s4sdy_dir\bk' to 'C:\Users\jpriest\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib/rustlib/x86_64-pc-windows-msvc/bin'
error: failed to install component: 'rust-docs-x86_64-pc-windows-msvc', detected conflict: '"share/doc/rust/html"'
Every rustup command that tries to do anything like toolchain install nightly or self uninstall takes ages.
Same presists in the lastest version of the rustup update as well...
位 rustup update
info: syncing channel updates for 'stable-x86_64-pc-windows-msvc'
info: latest update on 2018-09-13, rust version 1.29.0 (aa3ca1994 2018-09-11)
info: downloading component 'rustc'
info: downloading component 'rust-std'
info: downloading component 'cargo'
info: downloading component 'rust-docs'
info: downloading component 'rust-src'
info: downloading component 'rust-analysis'
info: downloading component 'rls-preview'
info: removing component 'rustc'
info: removing component 'rust-std'
info: removing component 'cargo'
info: removing component 'rust-docs'
warning: during uninstall component rust-docs-x86_64-pc-windows-msvc was not found
info: removing component 'rust-src'
warning: during uninstall component rust-src was not found
info: removing component 'rust-analysis'
warning: during uninstall component rust-analysis-x86_64-pc-windows-msvc was not found
info: removing component 'rls-preview'
warning: during uninstall component rls-preview-x86_64-pc-windows-msvc was not found
info: installing component 'rustc'
info: installing component 'rust-std'
info: installing component 'cargo'
info: installing component 'rust-docs'
info: rolling back changes
error: could not rename component file from 'C:\Users\Murali1M\.rustup\tmp\v3ozqz6iybvw_wns_dir\bk' to 'C:\Users\Murali1M\.rustup\toolchains\stable-x86_64-pc-windows-msvc\etc'
error: could not rename component file from 'C:\Users\Murali1M\.rustup\tmp\f5oczo1esrkipk5p_dir\bk' to 'C:\Users\Murali1M\.rustup\toolchains\stable-x86_64-pc-windows-msvc\etc/bash_completion.d'
error: could not rename component file from 'C:\Users\Murali1M\.rustup\tmp\e8b7qj9n3dzlpyh0_dir\bk' to 'C:\Users\Murali1M\.rustup\toolchains\stable-x86_64-pc-windows-msvc\bin'
error: could not rename component file from 'C:\Users\Murali1M\.rustup\tmp\2_fbfcegbkzeqo31_dir\bk' to 'C:\Users\Murali1M\.rustup\toolchains\stable-x86_64-pc-windows-msvc\share/doc/cargo'
error: could not rename component file from 'C:\Users\Murali1M\.rustup\tmp\4p250m_r6vseq1nj_dir\bk' to 'C:\Users\Murali1M\.rustup\toolchains\stable-x86_64-pc-windows-msvc\share/man'
error: could not rename component file from 'C:\Users\Murali1M\.rustup\tmp\_gxg5z6ikakoozef_dir\bk' to 'C:\Users\Murali1M\.rustup\toolchains\stable-x86_64-pc-windows-msvc\share/man/man1'
error: could not rename component file from 'C:\Users\Murali1M\.rustup\tmp\32__26ej98ahj077_dir\bk' to 'C:\Users\Murali1M\.rustup\toolchains\stable-x86_64-pc-windows-msvc\share/zsh'
error: could not rename component file from 'C:\Users\Murali1M\.rustup\tmp\mfkzyjwppde3k9hm_dir\bk' to 'C:\Users\Murali1M\.rustup\toolchains\stable-x86_64-pc-windows-msvc\share/zsh/site-functions'
error: could not rename component file from 'C:\Users\Murali1M\.rustup\tmp\gexm_rxxo52qo64q_dir\bk' to 'C:\Users\Murali1M\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib/rustlib/x86_64-pc-windows-msvc'
error: could not rename component file from 'C:\Users\Murali1M\.rustup\tmp\kb8s8nrzm8rwmvpq_dir\bk' to 'C:\Users\Murali1M\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib/rustlib/x86_64-pc-windows-msvc/lib'
error: could not rename component file from 'C:\Users\Murali1M\.rustup\tmp\3q6e5vtjdmygnd3m_dir\bk' to 'C:\Users\Murali1M\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib/rustlib/x86_64-pc-windows-msvc/codegen-backends'
error: could not rename component file from 'C:\Users\Murali1M\.rustup\tmp\ckrksp2x2vrucidp_dir\bk' to 'C:\Users\Murali1M\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib/rustlib/etc'
error: could not rename component file from 'C:\Users\Murali1M\.rustup\tmp\euz9rbe0jnouexx1_dir\bk' to 'C:\Users\Murali1M\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib/rustlib/x86_64-pc-windows-msvc/bin'
error: failed to install component: 'rust-docs-x86_64-pc-windows-msvc', detected conflict: '"share/doc/rust/html"'
info: checking for self-updates
stable-x86_64-pc-windows-msvc update failed - rustc 1.29.0 (aa3ca1994 2018-09-11)
Need help to resolve this issue.
I'm having the same problem. Using ProcMon I've traced the problem to calls to MoveFileExW returning access denied on each of the files mentioned in the error. Unfortunately, I have no idea why this would happen.
This helped me:
Windows Defender > Virus & threat protection > Virus & threat protection settings > Add or remove exclusions > Add an exclusion > Folder > ~/.rustup https://github.com/rust-lang-nursery/rustup.rs/issues/763#issuecomment-407481780
rustup toolchain remove nightly https://github.com/rust-lang-nursery/rustup.rs/issues/501#issuecomment-222177690
rm -rf ~/.rustup/tmp - this maybe optional, but I was getting errors that something from tmp cannot be renamed https://github.com/rust-lang-nursery/rustup.rs/issues/1245
rustup install nightly
This was still happening for me. Beyond rofrol's suggestions, I also had
rustup toolchain remove every installed toolchain, then reinstall the ones I want.Unfortunately there's little we can do short-term about Windows Defender. We're looking into sorting a mechanism for trusted binary signatures, but we're a long way off that.
If you have antivirus then you'll have to turn that off instead of windows defender. Although the way I solved it using visual studio code was:
Disable Mcafee works for me on WSL. Thanks, rofrol!
There are several distinct issues discussed here. The original issue is another instance of missing/corrupt manifest data. Without knowledge of the installed file, rustup cannot remove it prior to installing the updated version, and then hits a conflict due to the file already existing, and you get the error.
We've got a bunch of these bugs scattered all over the place, I'm closing them all to bring order. See #2417.
Most helpful comment
This helped me:
Windows Defender > Virus & threat protection > Virus & threat protection settings > Add or remove exclusions > Add an exclusion > Folder > ~/.rustuphttps://github.com/rust-lang-nursery/rustup.rs/issues/763#issuecomment-407481780rustup toolchain remove nightlyhttps://github.com/rust-lang-nursery/rustup.rs/issues/501#issuecomment-222177690rm -rf ~/.rustup/tmp- this maybe optional, but I was getting errors that something from tmp cannot be renamed https://github.com/rust-lang-nursery/rustup.rs/issues/1245rustup install nightly