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 nightly fails on win10 #1436

Closed
fprijate opened this issue Jun 17, 2018 · 11 comments
Closed

rustup update nightly fails on win10 #1436

fprijate opened this issue Jun 17, 2018 · 11 comments

Comments

@fprijate
Copy link

fprijate commented Jun 17, 2018

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"'

@CAD97
Copy link

CAD97 commented Jun 22, 2018

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

@thetric
Copy link

thetric commented Jun 22, 2018

See #1443 (comment):

It's Rust build system issue and should be tracked in main repo: rust-lang/rust#51699

@JustAPerson
Copy link

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.

@muraray
Copy link

muraray commented Sep 19, 2018

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.

@AlphaModder
Copy link

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.

@rofrol
Copy link
Contributor

rofrol commented Oct 16, 2018

This helped me:

Windows Defender > Virus & threat protection > Virus & threat protection settings > Add or remove exclusions > Add an exclusion > Folder > ~/.rustup #763 (comment)

rustup toolchain remove nightly #501 (comment)

rm -rf ~/.rustup/tmp - this maybe optional, but I was getting errors that something from tmp cannot be renamed #1245

rustup install nightly

@sourcefrog
Copy link
Contributor

This was still happening for me. Beyond rofrol's suggestions, I also had

  1. Temporarily disable Windows Defender entirely
  2. rustup toolchain remove every installed toolchain, then reinstall the ones I want.

@kinnison
Copy link
Contributor

kinnison commented Apr 2, 2019

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.

@AsadMGradex
Copy link

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:

  • go to C:\Users\username.rustup\toolchains
  • Delete all of them (stable, nightly, beta etc)
  • open up visual studio code with the folder containing code that needs the nightly version. visual code brings up option to download nightly there so click yes and it will automatically download nightly.
  • Run cmd prompt as administrator and re-downloading the stable version for later use: rustup toolchain install stable-x86_64-pc-windows-msvc

@HappyTigger
Copy link

Disable Mcafee works for me on WSL. Thanks, rofrol!

@rbtcollins
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests