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

failed to install component: 'rustfmt-preview.. detected conflict: '"share/doc/rustfmt/README.md"' #1359

Closed
FauxFaux opened this issue Feb 20, 2018 · 1 comment

Comments

@FauxFaux
Copy link

I've managed to confuse rustup on this one machine. I believe I may have run rustup component add while rustup update was running concurrently.

My default toolchain is nightly. rustup managed rustfmt is in ~/.cargo/bin:

% ls ~/.cargo/bin       
cargo  cargo-clippy  cargo-fmt  clippy-driver  git-fmt  rls  rustc 
rustdoc  rustfmt  rustfmt-format-diff  rust-gdb  rust-lldb  rustup

rustfmt won't start because it's expecting a different toolchain, because rustup update doesn't update it.

% rustup component list --toolchain=nightly | fgrep default
cargo-x86_64-unknown-linux-gnu (default)
rust-docs-x86_64-unknown-linux-gnu (default)
rust-std-x86_64-unknown-linux-gnu (default)
rustc-x86_64-unknown-linux-gnu (default)

% rustfmt
~/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/rustfmt: error while loading shared libraries:
   libsyntax-59d13492ed717eeb.so: cannot open shared object file: No such file or directory

I can't re-add it, due to a conflict at a weird path:

% rustup component add rustfmt-preview --toolchain=nightly
info: downloading component 'rustfmt-preview'
info: installing component 'rustfmt-preview'
info: rolling back changes
error: failed to install component: 'rustfmt-preview-x86_64-unknown-linux-gnu', detected conflict:
   '"share/doc/rustfmt/README.md"'

The file does exist:

% file ~/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/share/doc/rustfmt/README.md
../README.md: ASCII text, with very long lines

I could personally resolve this by blowing away ~/.cargo and ~/.rustup, or possibly just by uninstalling and re-installing the nightly toolchain, but I feel the errors or consistency could be improved?

@Diggsey
Copy link
Contributor

Diggsey commented May 28, 2018

Dup of #988

@Diggsey Diggsey closed this as completed May 28, 2018
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

2 participants