The terminal process failed to launch: Path to shell executable "cargo" does not exist解决方案
-
配置:
WSL+vscode+ubuntu24 -
问题:在vscode使用rust-analyzer点击RunThe terminal process failed to launch: Path to shell executable "cargo" does not exist
-
解决方案
-
在环境变量中加入cargo/bin
$ vim ~/.bashrc export PATH="$HOME/.cargo/bin:$PATH" $ source ~/.bashrc -
在rust-analyzer的settings.json加入路径
"git.openRepositoryInParentFolders": "never", "files.autoSave": "afterDelay", "workbench.startupEditor": "none", "rust-analyzer.linkedProjects": [ ], "rust-analyzer.cargo.cargoBinPath": "/home/username/.cargo/bin/cargo", # change your path "rust-analyzer.rustc.path": "/home/username/.cargo/bin/rustc" # change your path } -
重启
-
浙公网安备 33010602011771号