Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renaming error: Failing to update from 1.7.0 to 1.16.0 #1067

Closed
jumbosushi opened this issue Apr 14, 2017 · 4 comments
Closed

Renaming error: Failing to update from 1.7.0 to 1.16.0 #1067

jumbosushi opened this issue Apr 14, 2017 · 4 comments

Comments

@jumbosushi
Copy link

jumbosushi commented Apr 14, 2017

OS:
Ubuntu 16.04 LTS

Versions:
rustup 1.2.0 (70faf07 2017-04-08)
rustc 1.7.0

When I run rustup --update I'm getting "could not rename component" error. Here's the output

$  rustup update
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: downloading component 'rustc'
info: downloading component 'rust-std'
info: downloading component 'cargo'
warning: during uninstall component rust-std-x86_64-unknown-linux-gnu was not found
warning: during uninstall component cargo-x86_64-unknown-linux-gnu was not found
info: installing component 'rustc'
info: installing component 'rust-std'
info: rolling back changes
error: could not rename component directory from '/home/atsushi/.rustup/tmp/fr_9mhf_v34ho_mg_dir/bk' to '/home/atsushi/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/share'
error: could not rename component directory from '/home/atsushi/.rustup/tmp/u5zazkz1kr8kaknm_dir/bk' to '/home/atsushi/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/share/man'
error: could not rename component directory from '/home/atsushi/.rustup/tmp/fq_n8e8vqvknrrfx_dir/bk' to '/home/atsushi/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/share/doc'
error: failed to install component: 'rust-std-x86_64-unknown-linux-gnu', detected conflict: '"lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-c53f99154bf815c4.rlib"'
info: checking for self-updates

  stable-x86_64-unknown-linux-gnu update failed - rustc 1.16.0 (30cf806ef 2017-03-10)
@Diggsey
Copy link
Contributor

Diggsey commented May 3, 2017

Did you make any changes to these directories yourself? Alternatively, could you have run rustup in parallel by accident? Unfortunately without more information or steps to reproduce it will be difficult to diagnose.

@hatzel
Copy link

hatzel commented May 8, 2017

I can reproduce what looks to me like a related issue, I am not to sure if it is actually a rustup bug. I am just going to leave the results of my investigation here though.
This was occurring for me when using Docker on Travis to build an image, stupidly I was installing the nightly toolchain twice (once in the image I was depending on and once in my own Dockerfile), it was still working fine until a week or so ago. Then it broke with this error:

error: could not rename component directory from '/root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/share/doc/rust/html' to '/root/.rustup/tmp/yditegn5uckwjmt2_dir/bk'
info: caused by: Invalid cross-device link (os error 18)

A minimal repository reproducing this can be found here notice how the newest build passes and the one before it fails. The relevant diff shows what my fix ultimately was.

I am not sure why exactly this was happening as I can't just reproduce it by running cargo install nightly twice (locally). I hope this can help someone.

@mthgr
Copy link

mthgr commented May 26, 2018

I've been having this problems first on W7-64bits, now on Win10 64 bits. Same error as above it comes and go depending on rust version and it only happens on update. My install is with all the defaults no change (if that helps).

@rbtcollins
Copy link
Contributor

This is another instance of missing/corrupt manifest data. Without knowledge of the installed file, rustup cannot remove it prior to installing the updated version, and then hits a conflict due to the file already existing, and you get the error.

We've got a bunch of these bugs scattered all over the place, I'm closing them all to bring order. See #2417.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants