You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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'
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 cb2d148.
Reacted by John Thile, Patrick Reisert, Lane Gniewek, Dan Olson, Jaanus Varus, Daniel Miranda and Peter Atashian
Possibly related. Running rustup self update on Windows 10 64-bit in the git-for-windows bash shell. Past updates have worked successfully. No rustup executables exist in cargo/bin after the error messages below.
$ rustup self update
info: checking for self-updates
info: downloading self-update
info: rustup updated successfully to 1.8.0
error: could not copy file from 'C:\Users\mike\.local\share\cargo\bin\rustup-init.exe' to 'C:\Users\mike\.local\share\cargo\bin\rustup.exe'
info: caused by: Access is denied. (os error 5)
Downloading rustup-init.exe and running from a regular command prompt I get the following errors:
C:\Users\mike\Downloads>rustup-init.exe --no-modify-path
error: it looks like you have an existing installation of Rust at:
error: C:\Users\mike\.local\share\cargo\bin
error: rustup cannot be installed alongside Rust. Please uninstall first
error: if this is what you want, restart the installation with `-y'
error: cannot install while Rust is installed
C:\Users\mike\Downloads>rustup-init.exe --no-modify-path -y
warning: tool `rustfmt` is already installed, remove it from `C:\Users\mike\.local\share\cargo\bin`, then run `rustup update` to have rustup manage this tool.
warning: tool `cargo-fmt` is already installed, remove it from `C:\Users\mike\.local\share\cargo\bin`, then run `rustup update` to have rustup manage this tool.
info: updating existing rustup installation
Running cargo uninstall rustfmt-nightly and allows rustup to install successfully but subsequent self updates fail:
C:\Users\mike\Downloads>rustup-init.exe --no-modify-path -y
info: updating existing rustup installation
C:\Users\mike\Downloads>rustup self update
info: checking for self-updates
error: could not create link from 'C:\Users\mike\.local\share\cargo\bin\rustup.exe' to 'C:\Users\mike\.local\share\cargo\bin\rustc.exe'
Yeah, I can confirm that rustup update does not work anymore. You need to delete all of the tools it mentions at the same time for it not to error out. It'll error out on the next update again though
We're seeing the same failure across many AppVeyor builds, eg.
verbose: toolchain 'stable-i686-pc-windows-msvc' installed
info: default toolchain set to 'stable'
stable installed - rustc 1.22.1 (05e2e1c41 2017-11-22)
set PATH=%PATH%;%USERPROFILE%\.cargo\bin
rustup update
info: syncing channel updates for 'stable-i686-pc-windows-msvc'
info: checking for self-updates
stable-i686-pc-windows-msvc unchanged - rustc 1.22.1 (05e2e1c41 2017-11-22)
error: could not create link from 'C:\Users\appveyor\.cargo\bin\rustup.exe' to 'C:\Users\appveyor\.cargo\bin\rustc.exe'
λ rustup update
info: syncing channel updates for 'beta-x86_64-pc-windows-msvc'
info: syncing channel updates for 'nightly-x86_64-pc-windows-msvc'
info: checking for self-updates
beta-x86_64-pc-windows-msvc unchanged - rustc 1.23.0-beta.2 (c9107ee93 2017-12-08)
nightly-x86_64-pc-windows-msvc unchanged - rustc 1.24.0-nightly (c284f8807 2017-12-24)
warning: tool `rustfmt` is already installed, remove it from `C:\Users\scott\.cargo\bin`, then run `rustup update` to have rustup manage this tool.
warning: tool `cargo-fmt` is already installed, remove it from `C:\Users\scott\.cargo\bin`, then run `rustup update` to have rustup manage this tool.
Removed 'rustfmt' and 'cargo-fmt' as indicated, then:
λ rustup update
info: syncing channel updates for 'beta-x86_64-pc-windows-msvc'
info: syncing channel updates for 'nightly-x86_64-pc-windows-msvc'
info: checking for self-updates
beta-x86_64-pc-windows-msvc unchanged - rustc 1.23.0-beta.2 (c9107ee93 2017-12-08)
nightly-x86_64-pc-windows-msvc unchanged - rustc 1.24.0-nightly (c284f8807 2017-12-24)
error: could not create link from 'C:\Users\scott\.cargo\bin\rustup.exe' to 'C:\Users\scott\.cargo\bin\rustc.exe'
@hherman1 Perhaps you commented on the wrong issue. Anyway you're trying to add a component named rustfmt that does not exist, thus the error. The component you're looking for is named rustfmt-preview and you can see from rustup component list
Activity
Antelope13 commentedon Dec 19, 2017
I'm getting the same thing. Win 10, 64 bit.
kjeremy commentedon Dec 19, 2017
Seeing this on Windows 7 x64 for cargo, cargo-fmt, rls, rustc, rustdoc, rustfmt, rust-gdb, and rust-lldb
Eh2406 commentedon Dec 19, 2017
I don't know if it is relevant but cargo is not finding
cargo-fmtdespite it being on my path.BrianLee608 commentedon Dec 20, 2017
Getting the same error:
systemtrap commentedon Dec 20, 2017
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 cb2d148.iliekturtles commentedon Dec 21, 2017
Possibly related. Running
rustup self updateon Windows 10 64-bit in the git-for-windows bash shell. Past updates have worked successfully. Norustupexecutables exist incargo/binafter the error messages below.Downloading
rustup-init.exeand running from a regular command prompt I get the following errors:Running
cargo uninstall rustfmt-nightlyand allows rustup to install successfully but subsequent self updates fail:CryZe commentedon Dec 22, 2017
Yeah, I can confirm that
rustup updatedoes not work anymore. You need to delete all of the tools it mentions at the same time for it not to error out. It'll error out on the next update again thoughCryZe commentedon Dec 22, 2017
These are the tools you need to delete:
petertiedemann commentedon Dec 22, 2017
Me too (also win 10 x64)
whilei commentedon Dec 22, 2017
We're seeing the same failure across many AppVeyor builds, eg.
Any solves or workarounds would be very welcome -- this is a blocking issue for many of our projects.
DustinByfuglien commentedon Dec 23, 2017
Confirm.
I have this problem in Windows 7 x64.
nonsensecreativity commentedon Dec 24, 2017
Confirm,
I have this problem in Windows 10 x64
workingj commentedon Dec 25, 2017
I do have the same issue too.
Win 10 x64
gagarin55 commentedon Dec 25, 2017
Same issue
sc0ttwad3 commentedon Dec 25, 2017
Same here Win10 x64 (17063):
Removed 'rustfmt' and 'cargo-fmt' as indicated, then:
17 remaining items
Fix self update errors filling in missing proxies
Fix self update errors filling in missing proxies
Fix self update errors filling in missing proxies
Fix self update errors filling in missing proxies
Fix self update errors filling in missing proxies
Fix self update errors filling in missing proxies
Fix self update errors filling in missing proxies
Auto merge of #1326 - alexcrichton:fix-errors, r=alexcrichton
Yanpas commentedon Jan 4, 2018
I still get
error: could not create link from 'C:\Users\USERNAME\.cargo\bin\rustup.exe' to 'C:\Users\USERNAME\.cargo\bin\rustc.exe'alexcrichton commentedon Jan 4, 2018
@Yanpas an updated version of rustup had not been released, it shoudl be fixed now.
hherman1 commentedon Mar 7, 2018
Having this issue. Was on a pretty old version of rustup and updated recently. GOt the warnings about rustfmt and cargo-fmt, complied, and suffered.
The error:
Attempt to solve:
Version:
Arnavion commentedon Mar 7, 2018
@hherman1 Perhaps you commented on the wrong issue. Anyway you're trying to add a component named
rustfmtthat does not exist, thus the error. The component you're looking for is namedrustfmt-previewand you can see fromrustup component listFix self update errors filling in missing proxies
Zykino commentedon Oct 26, 2018
I just got the same error updating to 1.30.
Also after trying
rustup self updateif it matters (just in case since I saw people using this command in this thread).Since the issue was closed about 1 year ago tell me if you prefer that I open a new one.