rustup: rustup update error
I get this error today:
C:\rust_things>rustup -V
rustup 1.8.0 (cb2d14862 2017-12-17)
C:\rust_things>rustup self update
info: checking for self-updates
error: could not create link from 'C:\Users\finkelman\.cargo\bin\rustup.exe' to 'C:\Users\finkelman\.cargo\bin\rustc.exe'
Don’t know what it means just reporting.
Win 10, 64 bit.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 41
- Comments: 28 (2 by maintainers)
Commits related to this issue
- Restart CI Rel https://github.com/rust-lang-nursery/rustup.rs/issues/1316, testing fix from https://github.com/rust-lang-nursery/rustup.rs/pull/1310 — committed to ethereumproject/go-ethereum by whilei 7 years ago
- Problem: rustup does not work on AppVeyor. Solution: downgrad until fix. https://github.com/rust-lang-nursery/rustup.rs/issues/1316\#issuecomment-354156348 — committed to gagarin55/emerald-cli by gagarin55 7 years ago
- Fix self update errors filling in missing proxies The previous logic had some subtle bugs for a number of reasons, and hopefully this iteration irons them out. Closes #1316 — committed to alexcrichton/rustup.rs by alexcrichton 6 years ago
- Auto merge of #1326 - alexcrichton:fix-errors, r=alexcrichton Fix self update errors filling in missing proxies The previous logic had some subtle bugs for a number of reasons, and hopefully this it... — committed to rust-lang/rustup by bors 6 years ago
- Fix self update errors filling in missing proxies The previous logic had some subtle bugs for a number of reasons, and hopefully this iteration irons them out. Closes #1316 — committed to alexcrichton/rustup.rs by alexcrichton 6 years ago
- Fix self update errors filling in missing proxies The previous logic had some subtle bugs for a number of reasons, and hopefully this iteration irons them out. Closes #1316 — committed to alexcrichton/rustup.rs by alexcrichton 6 years ago
- Fix self update errors filling in missing proxies The previous logic had some subtle bugs for a number of reasons, and hopefully this iteration irons them out. Closes #1316 — committed to alexcrichton/rustup.rs by alexcrichton 6 years ago
- Fix self update errors filling in missing proxies The previous logic had some subtle bugs for a number of reasons, and hopefully this iteration irons them out. Closes #1316 — committed to alexcrichton/rustup.rs by alexcrichton 6 years ago
- Fix self update errors filling in missing proxies The previous logic had some subtle bugs for a number of reasons, and hopefully this iteration irons them out. Closes #1316 — committed to alexcrichton/rustup.rs by alexcrichton 6 years ago
- Fix self update errors filling in missing proxies The previous logic had some subtle bugs for a number of reasons, and hopefully this iteration irons them out. Closes #1316 — committed to alexcrichton/rustup.rs by alexcrichton 6 years ago
- Fix self update errors filling in missing proxies The previous logic had some subtle bugs for a number of reasons, and hopefully this iteration irons them out. Closes #1316 — committed to alexcrichton/rustup.rs by alexcrichton 6 years ago
- Fix self update errors filling in missing proxies The previous logic had some subtle bugs for a number of reasons, and hopefully this iteration irons them out. Closes #1316 — committed to alexcrichton/rustup.rs by alexcrichton 6 years ago
- Fix self update errors filling in missing proxies The previous logic had some subtle bugs for a number of reasons, and hopefully this iteration irons them out. Closes #1316 — committed to alexcrichton/rustup.rs by alexcrichton 6 years ago
- Fix self update errors filling in missing proxies The previous logic had some subtle bugs for a number of reasons, and hopefully this iteration irons them out. Closes #1316 — committed to alexcrichton/rustup.rs by alexcrichton 6 years ago
- Fix self update errors filling in missing proxies The previous logic had some subtle bugs for a number of reasons, and hopefully this iteration irons them out. Closes #1316 — committed to alexcrichton/rustup.rs by alexcrichton 6 years ago
- Fix self update errors filling in missing proxies The previous logic had some subtle bugs for a number of reasons, and hopefully this iteration irons them out. Closes #1316 — committed to alexcrichton/rustup.rs by alexcrichton 6 years ago
- Auto merge of #1326 - alexcrichton:fix-errors, r=alexcrichton Fix self update errors filling in missing proxies The previous logic had some subtle bugs for a number of reasons, and hopefully this it... — committed to rust-lang/rustup by bors 6 years ago
- Fix self update errors filling in missing proxies The previous logic had some subtle bugs for a number of reasons, and hopefully this iteration irons them out. Closes #1316 — committed to mattico/rustup.rs by alexcrichton 6 years ago
These are the tools you need to delete:
I ran into the same problem. In “raw.rs” the function hardlink tries to unlink the destinaton file but does not care about the io::Result. This call fails on my system. Any attempt to link the file fails due to an already existing file.
As far as I understand informations from MSDN right now hardlinks are not removeable when the the file is locked. It seems to be locked due to running rustup.exe.
Has the mechanisms for handling .cargo/bin changed recently?The Problem was introduced with #1310 and cb2d148622a2584839a0cb1e8f8926e5662f59b6.Fresh install WIN10 Enterprise Version 1709 (OS Build 16299.125)
λ rustup -v update verbose: read metadata version: ‘12’ verbose: updating existing install for ‘stable-x86_64-pc-windows-msvc’ verbose: toolchain directory: ‘C:\Users\user.rustup\toolchains\stable-x86_64-pc-windows-msvc’ info: syncing channel updates for ‘stable-x86_64-pc-windows-msvc’ verbose: creating temp file: C:\Users\user.rustup\tmp\5fvcc3mwhxgy6hei_file verbose: downloading file from: ‘https://static.rust-lang.org/dist/channel-rust-stable.toml.sha256’ verbose: downloading with curl verbose: deleted temp file: C:\Users\user.rustup\tmp\5fvcc3mwhxgy6hei_file verbose: toolchain is already up to date info: checking for self-updates
stable-x86_64-pc-windows-msvc unchanged - rustc 1.22.1 (05e2e1c41 2017-11-22)
error: could not create link from ‘C:\Users\user.cargo\bin\rustup.exe’ to ‘C:\Users\user.cargo\bin\rustc.exe’
I’m getting a similar error:
I noticed that the last error messages appear after a new prompt, after rustup.exe has exited. This seems to indicate that the failing operation is done in a subprocess. Looking at Procmon output this is indeed the case:
That last last command is done after “rustup.exe” exits in self_update.rs:
This code hasn’t been changed for a long time, so I don’t know why it started failing now for me, but I think there is a race condition: The executable file is not immediately accessible after the process has exited. (This presentation and the similarly named Youtube video give interesting facts about e.g. the asynchronous nature of file deletion in Windows: Racing the Filesystem by Niall Douglas.)
I would try to have a sleep/retry loop around
install_bins()in that function.Getting the same error:
@Yanpas an updated version of rustup had not been released, it shoudl be fixed now.
To downgrade appveyor to older version, use