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

error: failed to install component: 'rust-src', detected conflict: 'lib/rustlib/src/rust/Cargo.lock' #3716

Closed
VorpalBlade opened this issue Mar 14, 2024 · 1 comment
Labels

Comments

@VorpalBlade
Copy link

Problem

After upgrading to rustup 1.27 I get this error:

$ rustup update
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: syncing channel updates for 'nightly-x86_64-unknown-linux-gnu'
info: latest update on 2024-03-14, rust version 1.78.0-nightly (3cbb93223 2024-03-13)
info: downloading component 'rust-src'
info: downloading component 'rust-std' for 'riscv32imac-unknown-none-elf'
info: downloading component 'rust-std' for 'riscv32imafc-unknown-none-elf'
info: downloading component 'rust-std' for 'riscv32imc-unknown-none-elf'
info: downloading component 'rust-std' for 'x86_64-pc-windows-gnu'
 22.1 MiB /  22.1 MiB (100 %)  18.6 MiB/s in  1s ETA:  0s
info: downloading component 'rustc-codegen-cranelift'
info: downloading component 'miri'
info: downloading component 'cargo'
info: downloading component 'clippy'
info: downloading component 'rust-docs'
info: downloading component 'rust-std'
 26.1 MiB /  26.1 MiB (100 %)  18.6 MiB/s in  1s ETA:  0s
info: downloading component 'rustc'
 63.9 MiB /  63.9 MiB (100 %)  18.5 MiB/s in  3s ETA:  0s
info: downloading component 'rustfmt'
info: removing previous version of component 'rust-src'
warning: during uninstall component rust-src was not found
info: removing previous version of component 'rust-std' for 'riscv32imac-unknown-none-elf'
info: removing previous version of component 'rust-std' for 'riscv32imafc-unknown-none-elf'
info: removing previous version of component 'rust-std' for 'riscv32imc-unknown-none-elf'
warning: during uninstall component rust-std was not found
info: removing previous version of component 'rust-std' for 'x86_64-pc-windows-gnu'
warning: during uninstall component rust-std was not found
info: removing previous version of component 'rustc-codegen-cranelift'
warning: during uninstall component rustc-codegen-cranelift was not found
info: removing previous version of component 'miri'
warning: during uninstall component miri was not found
info: removing previous version of component 'cargo'
warning: during uninstall component cargo was not found
info: removing previous version of component 'clippy'
warning: during uninstall component clippy was not found
info: removing previous version of component 'rust-docs'
info: removing previous version of component 'rust-std'
info: removing previous version of component 'rustc'
info: removing previous version of component 'rustfmt'
info: installing component 'rust-src'
info: rolling back changes
error: failed to install component: 'rust-src', detected conflict: 'lib/rustlib/src/rust/Cargo.lock'

       stable-x86_64-unknown-linux-gnu unchanged - rustc 1.76.0 (07dca489a 2024-02-04)
  nightly-x86_64-unknown-linux-gnu update failed - rustc 1.78.0-nightly (516b6162a 2024-03-03)

info: cleaning up downloads & tmp directories
info: self-update is disabled for this build of rustup
info: any updates to rustup will need to be fetched with your system package manager

From this it is not clear what the course of action is supposed to be, nor what happened. I have not knownly created any Cargo.lock file for rustup. I'm surprised at the quality of the error message here, usually rust and cargo at least give helpful hints on how to fix issues.

Note: Rustup was installed from Arch Linux (pacman -S rustup)

Steps

  1. rustup update

Possible Solution(s)

No response

Notes

No response

Rustup version

rustup 1.27.0 (2024-03-12)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.76.0 (07dca489a 2024-02-04)`

Installed toolchains

Default host: x86_64-unknown-linux-gnu
rustup home:  /home/arvid/.rustup

installed toolchains
--------------------

stable-x86_64-unknown-linux-gnu (default)
nightly-x86_64-unknown-linux-gnu
esp

installed targets for active toolchain
--------------------------------------

aarch64-unknown-linux-musl
armv7-unknown-linux-musleabihf
i686-unknown-linux-musl
x86_64-pc-windows-gnu
x86_64-unknown-linux-gnu
x86_64-unknown-linux-musl

active toolchain
----------------

stable-x86_64-unknown-linux-gnu (default)
rustc 1.76.0 (07dca489a 2024-02-04)
@rami3l
Copy link
Member

rami3l commented Mar 15, 2024

@VorpalBlade Thank for filing this issue! This is almost certainly another instance of #988 caused by updating Rust with your IDE open. The current workaround would be reinstalling that toolchain.

If you have further questions, please feel free to ask us!

PS: #988 has been on our radar for a really long time and we've been annoyed by it ourselves :[

@rami3l rami3l closed this as not planned Won't fix, can't repro, duplicate, stale Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants