rust-lang / rust-lang/rustup

Unable to switch to nightly on Windows

Open
#3,374 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Rust
Stars
7k
Forks
1.1k
Avg merge
22h 40m
Merged PRs (30d)
46

Description

Problem

Related to https://github.com/rust-lang/rustup/issues/2248

I was previously not able to install rust, and had to move the installer to the desktop in order for it to work.

But now when I try to change the default channel to nightly, I get this error:

$ rustup default nightly
info: syncing channel updates for 'nightly-x86_64-pc-windows-msvc'
info: latest update on 2023-06-05, rust version 1.72.0-nightly (101fa903b 2023-06-04)
info: downloading component 'cargo'
info: downloading component 'clippy'
info: downloading component 'rust-docs'
info: downloading component 'rust-std'
info: downloading component 'rustc'
info: downloading component 'rustfmt'
info: installing component 'cargo'
info: installing component 'clippy'
info: installing component 'rust-docs'
info: retrying renaming 'C:\Users\USERNAME\.rustup\tmp\1t5ptbbqg5q7p5_r_dir\rust-docs\share/doc/rust/html' to 'C:\Users\USERNAME\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\share/doc/rust/html'
info: retrying renaming 'C:\Users\USERNAME\.rustup\tmp\1t5ptbbqg5q7p5_r_dir\rust-docs\share/doc/rust/html' to 'C:\Users\USERNAME\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\share/doc/rust/html'
...
info: retrying renaming 'C:\Users\USERNAME\.rustup\tmp\1t5ptbbqg5q7p5_r_dir\rust-docs\share/doc/rust/html' to 'C:\Users\USERNAME\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\share/doc/rust/html'
info: rolling back changes
error: could not rename component file from 'C:\Users\USERNAME\.rustup\tmp\z0ae1u_g2qk0m3wd_dir\rust-docs\share/doc/rust/html' to 'C:\Users\USERNAME\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\share/doc/rust/html': Access is denied. (os error 5)

Since it rolled back changes, I'm unable to use nightly.

I don't have McAfee installed however I do have Window's Firewall set up. This is a work laptop and I don't have admin privileges, and I am unable to disable the firewall

Steps
  1. Download https://static.rust-lang.org/rustup/dist/x86_64-pc-windows-msvc/rustup-init.exe
  2. Place .exe in the Desktop
  3. Install
  4. Run rustup default nightly
Possible Solution(s)

No response

Notes

No response

Rustup version
$ rustup --version
rustup 1.25.2 (17db695f1 2023-02-01)
Installed toolchains
$ rustup show
Default host: x86_64-pc-windows-msvc
rustup home:  C:\Users\USERNAME\.rustup

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

stable-x86_64-pc-windows-msvc (default)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Windows flow using rustup-init.exe, then run rustup default nightly on a non-admin account and compare the reported rename failure. Trace the rustup default nightly entry point and the component installation path; done means nightly installs successfully or the access-denied cause and a confirmed workaround are documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
operating-systems, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.