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 fails to self-update on Windows (sometimes?) #2803

Closed
jyn514 opened this issue Jun 22, 2021 · 2 comments
Closed

rustup fails to self-update on Windows (sometimes?) #2803

jyn514 opened this issue Jun 22, 2021 · 2 comments

Comments

@jyn514
Copy link
Member

jyn514 commented Jun 22, 2021

Problem

Rustup gives an error while updating:

$ rustup update
  nightly-x86_64-pc-windows-msvc updated - rustc 1.55.0-nightly (e82b65026 2021-06-20) (from rustc 1.54.0-nightly (cc77ba46f 2021-06-03))

info: checking for self-updates
info: downloading self-update
PS C:\Users\Joshua Nelson\src\docs.rs> error: could not remove 'rustup-bin' file: 'C:\Users\Joshua Nelson\.cargo\bin\rustup.exe'

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

PS C:\Users\Joshua Nelson\src\docs.rs> rustup --version
rustup 1.24.2 (755e2b07e 2021-05-12)

In particular, this should have been 1.24.3, not 1.24.2.

Strangely, running rustup self update says it works, but still gives the same error message:

PS C:\Users\Joshua Nelson\src\docs.rs> rustup self update
info: checking for self-updates
info: downloading self-update
  rustup updated - 1.24.3 (from 1.24.2)

PS C:\Users\Joshua Nelson\src\docs.rs> error: could not remove 'rustup-bin' file: 'C:\Users\Joshua Nelson\.cargo\bin\rustup.exe'

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

PS C:\Users\Joshua Nelson\src\docs.rs> rustup --version
rustup 1.24.2 (755e2b07e 2021-05-12)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.55.0-nightly (e82b65026 2021-06-20)`

Steps

Unsure, but rustup self update seems to be required.

Possible Solution(s)

mumble mumble windows file locking mumble mumble linux doesn't have these problems grumble

Notes

Output of rustup --version: rustup 1.24.2 (755e2b0 2021-05-12)
Output of rustup show:

Default host: x86_64-pc-windows-msvc
rustup home:  C:\Users\Joshua Nelson\.rustup

installed toolchains
--------------------

nightly-x86_64-pc-windows-msvc (default)
stage2

active toolchain
----------------

nightly-x86_64-pc-windows-msvc (default)
rustc 1.55.0-nightly (e82b65026 2021-06-20)
@jyn514 jyn514 added the bug label Jun 22, 2021
@kinnison
Copy link
Contributor

Yep, this is a known problem with Windows. It's always best to ensure that (a) you don't have any IDEs or other things open which might be using rustup and (b) you run rustup self update until it works.

@rbtcollins
Copy link
Contributor

Duplicate with #2441

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

No branches or pull requests

3 participants