Unable to switch to nightly on Windows
Nobody has claimed this yet.
- 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
- Download https://static.rust-lang.org/rustup/dist/x86_64-pc-windows-msvc/rustup-init.exe
- Place .exe in the Desktop
- Install
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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