VSCode集成终端启动失败 [英] VSCode integrated terminal failed to launch
问题描述
VSCode 集成终端启动失败并显示错误:
VSCode integrated terminal failed to launch and the error showed up:
终端进程无法启动:shell 可执行文件bash"的路径不是符号链接文件.
The terminal process failed to launch: Path to shell executable "bash" is not a file of a symlink.
尝试在官方故障排除页面中寻找解决方案,但无法真正找出问题的原因.
Tried to look for solution in official troubleshoot page but can't really figured the cause of the problem.
使用 CtrlAltT 启动外部终端 (gnome-terminal) 没问题.
Starting an external terminal (gnome-terminal) using CtrlAltT is fine.
还尝试过重新安装 VSCode、删除缓存等,仍然是同样的问题.几乎发生在我所有的 Ubuntu 计算机上.
Also tried to re-install VSCode, removing cache etc. still the same issues. Happens to almost all my Ubuntu computer.
在 Windows https://stackoverflow.com/a/64020049/16346600 中有类似的修复,但是如何在 Linux 中做到这一点?更特别的是我找不到这个terminal.integrated.shell.linux
.
There is a similar fix in Windows https://stackoverflow.com/a/64020049/16346600, but how to do it in Linux? More particularly I can't find this terminal.integrated.shell.linux
.
操作系统:Ubuntu18.04 LTS
OS: Ubuntu18.04 LTS
VSCode:1.57.1 版
VSCode: Version 1.57.1
推荐答案
似乎 VSCode 以某种方式找不到默认配置文件bash"的可执行文件路径.
It seems like VSCode somehow cannot find the path to executable for default profile "bash".
我通过提供 bash
的确切二进制路径来修复.
I fix by providing the exact binary path to bash
.
在settings.json
里面:
"terminal.integrated.profiles.linux": {
"bash": {
"path": "/bin/bash"
},
...
}
这篇关于VSCode集成终端启动失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!