Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

failed to install component: 'rust-src' #1587

Closed
Winches opened this issue Nov 10, 2019 · 10 comments
Closed

failed to install component: 'rust-src' #1587

Winches opened this issue Nov 10, 2019 · 10 comments

Comments

@Winches
Copy link

Winches commented Nov 10, 2019

I'm trying to use vscode with rls extension.But I got some error from console:

Executing task: rustup component add rust-src --toolchain stable-x86_64-pc-windows-msvc 
info: downloading component 'rust-src'
info: installing component 'rust-src'
info: rolling back changes
error: failed to install component: 'rust-src', detected conflict: '"lib/rustlib/src/rust/Cargo.lock"'

Versions:

rustc 1.39.0 (4560ea788 2019-11-04)
cargo 1.39.0 (1c6ec66d5 2019-09-30)
rls 1.39.0 (80a1d34 2019-09-20)
@Xanewok
Copy link
Member

Xanewok commented Nov 11, 2019

That's weird. What toolchains and associated toolchains do you have installed? Can you try reinstalling (removing and installing) the entire toolchain and see if the issue persists?

@Winches
Copy link
Author

Winches commented Nov 11, 2019

That's weird. What toolchains and associated toolchains do you have installed? Can you try reinstalling (removing and installing) the entire toolchain and see if the issue persists?

It's working fine after reinstalling toolchains.Thx.

@Winches Winches closed this as completed Nov 11, 2019
@ice1000
Copy link

ice1000 commented Nov 13, 2019

This happens to me as well. Maybe there are some issues with the recent nightly updates (I'm using nightly rust, msvc toolchain).

@ice1000
Copy link

ice1000 commented Nov 13, 2019

Reinstalling works for me as well, though.

@sigod
Copy link

sigod commented Jun 11, 2020

I had a similar issue when trying to update 1.43.0 -> 1.44.0:

error: failed to install component: 'rust-src', detected conflict: '"lib/rustlib\\manifest-rust-src"'

Reinstalling the toolchain (stable-x86_64-pc-windows-msvc) helped.

@uzqw
Copy link

uzqw commented Jul 14, 2021

thanks, reinstalling works for me

@whexy
Copy link

whexy commented Sep 17, 2021

Same problem and reinstalling works.

@the-moog
Copy link

the-moog commented Dec 21, 2021

As nobody else has said this, the following commands fixed it

rustup toolchain list
# get the name of the installed toolchain(s) and use that in the next line
rustup toolchain uninstall stable-x86_64-unknown-linux-gnu
rustup toolchain install stable

@Imani01
Copy link

Imani01 commented Feb 2, 2022

That's weird. What toolchains and associated toolchains do you have installed? Can you try reinstalling (removing and installing) the entire toolchain and see if the issue persists?

how do I reinstall the toolchain

@mqudsi
Copy link

mqudsi commented Apr 6, 2022

Old thread, but to help people finding this via Google:

how do I reinstall the toolchain

rustup toolchain remove stable/nightly/whatever
rustup toolchain install stable/nightly/whatever

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

No branches or pull requests

9 participants