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
{{ message }}
Repository navigation
rustup update fails because of missing directory #1167
I'm curious here... why the removal of a component fails because the absence of a directory (and in this specific case, a doc/copyright one)? Isn't it safe to just warn (if it is not expected) and keep going?
Well... after I removed my toolchains manually with:
$ rm -frv ~/.rustup/toolchains/*
$ rustup show
# ... downloaded some stuff
and then it worked.
This is what I think that happened:
I think something went wrong during the download of the initial toolchains. Then, rustup update got confused because some files were missing during removal of components (should it be?). After a cleanup on the toolchains directory, rustup fresh installed it all again and it worked fine.
Does rustup do integrity check after the download/installation of the toolchains already? If it does, then the corruption occured after that.
Anyway, wouldn't it be better to differentiate which error occurred during component removal? It's ok to abort the proccess when a permission error happens, but if it was an ErrorKind::ComponentMissingFile or ErrorKind::ComponentMissingDir error, I think the component removal shouln't be affected because of that).
Similar problems when trying to update. error: failure removing component 'rust-std-x86_64-apple-darwin', directory does not exist: '"lib/rustlib/x86_64-apple-darwin/lib/liblog-34f173aa5845f490.rlib"' using rustc 1.25.0 (84203cac6 2018-03-25)
Activity
lesichkovm commentedon Jun 15, 2017
$ rustc --version
rustc 1.17.0-nightly (b1e31766d 2017-03-03)
hbobenicio commentedon Feb 20, 2018
Same issue here:
BTW, "share/doc/rust/COPYRIGHT" is a missing file in the toolchain, not a directory...
I'm curious here... why the removal of a component fails because the absence of a directory (and in this specific case, a doc/copyright one)? Isn't it safe to just warn (if it is not expected) and keep going?
hbobenicio commentedon Feb 20, 2018
Well... after I removed my toolchains manually with:
and then it worked.
This is what I think that happened:
I think something went wrong during the download of the initial toolchains. Then,
rustup updategot confused because some files were missing during removal of components (should it be?). After a cleanup on the toolchains directory, rustup fresh installed it all again and it worked fine.Does rustup do integrity check after the download/installation of the toolchains already? If it does, then the corruption occured after that.
Anyway, wouldn't it be better to differentiate which error occurred during component removal? It's ok to abort the proccess when a permission error happens, but if it was an ErrorKind::ComponentMissingFile or ErrorKind::ComponentMissingDir error, I think the component removal shouln't be affected because of that).
https://github.com/rust-lang-nursery/rustup.rs/blob/master/src/rustup-dist/src/component/components.rs - at "// Remove parts" on lines 277
danielpclark commentedon Mar 5, 2018
Same issue:
I've deleted
~/.rustup/toolchains/*and now it works.theGeekPirate commentedon Jul 21, 2018
Probably belongs here, worked after I did what @danielpclark said above on Arch Linux.
> error: failure removing component 'rustc-x86_64-unknown-linux-gnu', directory does not exist: '"share/doc/rust/COPYRIGHT"'ra0x3 commentedon Aug 30, 2018
Similar problems when trying to update.
error: failure removing component 'rust-std-x86_64-apple-darwin', directory does not exist: '"lib/rustlib/x86_64-apple-darwin/lib/liblog-34f173aa5845f490.rlib"'usingrustc 1.25.0 (84203cac6 2018-03-25)kinnison commentedon Dec 29, 2019
Closed in favour of #1480, please comment there if you have further information.