Skip to content

Instantly share code, notes, and snippets.

@slackingfred
Last active September 14, 2024 20:20
Show Gist options
  • Save slackingfred/909717f0f02903b239a6ec57b6423118 to your computer and use it in GitHub Desktop.
Save slackingfred/909717f0f02903b239a6ec57b6423118 to your computer and use it in GitHub Desktop.
"rust-analyer failed to load workspace: Failed to find sysroot"

This may happen when Rust is installed by your distro's package manager instead of rustup. The cause is Rust source code not being automatically installed along with the compiler.

To fix, run:

sudo apt install rust-src

or

sudo dnf install rust-src
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment