【问题标题】:The vscode server failed to start SSHvscode服务器启动SSH失败
【发布时间】:2021-11-26 04:48:45
【问题描述】:

尝试通过 Visual Studio Code 的 Remote-SSH 连接到主机,我收到以下弹出错误:

Could not establish connection to 100.xxx.xx.xx The vscode server failed to start SSH

在输出终端上出现以下错误信息:

[16:22:19.929] > Waiting for server log...
[16:22:19.981] > Waiting for server log...
[16:22:20.034] > Waiting for server log...
[16:22:20.088] >  
> *
> * Reminder: You may only use this software with Visual Studio family products,  
> * as described in the license (https://go.microsoft.com/fwlink/?linkid=2077057) 
> *
> 
[16:22:20.102] > 
[16:22:20.130] > Server did not start successfully. Full server log at /home/pi/.vscode-server/.
> 7f6ab5485bbc0083e155244e.log >>>
> /home/pi/.vscode-server/bin/7f6ab5485bbc0083e155244e/node: /usr/
> lib/arm-linux-gnueabihf/libstdc++.so.6: version `CXXABI_1.3.9' not found (requir
> ed by /home/pi/.vscode-server/bin/7f6ab5485bbc0083e155244e/node)
> /home/pi/.vscode-server/bin/7f6ab5485bbc0083e155244e/node: /usr/
> lib/arm-linux-gnueabihf/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (requ
> ired by /home/pi/.vscode-server/bin/7f6ab5485bbc0083e155244e/nod
> e)
[16:22:20.136] > 
> <<< End of server log
[16:22:20.142] > 
> 2f61c0e4f600: start
> exitCode==32==
> listeningOn====
> osReleaseId==raspbian==
> arch==armv7l==
> tmpDir==/run/user/1000==
> platform==linux==
[16:22:20.148] > 
> unpackResult==success==
> didLocalDownload==0==
> downloadTime==15126==
> installTime==4341==
> extInstallTime====
> serverStartTime==7826==
> 2f61c0e4f600: end
[16:22:20.148] Received install output: 
exitCode==32==
listeningOn====
osReleaseId==raspbian==
arch==armv7l==
tmpDir==/run/user/1000==
platform==linux==
unpackResult==success==
didLocalDownload==0==
downloadTime==15126==
installTime==4341==
extInstallTime====
serverStartTime==7826==

[16:22:20.149] Resolver error: Error: The VS Code Server failed to start
    at Function.ServerInstallError (c:\Users\sa\.vscode\extensions\ms-vscode-remote.remote-ssh-0.65.8\out\extension.js:1:39675)
    at u (c:\Users\sa\.vscode\extensions\ms-vscode-remote.remote-ssh-0.65.8\out\extension.js:1:391298)
    at Object.t.handleInstallOutput (c:\Users\sa\.vscode\extensions\ms-vscode-remote.remote-ssh-0.65.8\out\extension.js:1:39717)
    at Object.t.tryInstall (c:\Users\sa\.vscode\extensions\ms-vscode-remote.remote-ssh-0.65.8\out\extension.js:1:48914)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async c:\Users\sa\.vscode\extensions\ms-vscode-remote.remote-ssh-0.65.8\out\extension.js:1:45110
    at async Object.t.withShowDetailsEvent (c:\Users\sa\.vscode\extensions\ms-vscode-remote.remote-ssh-0.65.8\out\extension.js:1:45660)
    at async Object.t.resolve (c:\Users\sa\.vscode\extensions\ms-vscode-remote.remote-ssh-0.65.8\out\extension.js:1:45189)
    at async c:\Users\sa\.vscode\extensions\ms-vscode-remote.remote-ssh-0.65.8\out\extension.js:1:52942
[16:22:20.153] ------

[16:22:20.652] > 
[16:22:21.437] "install" terminal command done
[16:22:21.438] Install terminal quit with output:

我已验证

  • 两者都在同一个网络中
  • 可以通过 ping 访问主机
  • 我可以在命令提示符和 powershell 等其他终端上通过 ssh 连接到它,我只在 VS Code 远程 SSH 上看到问题。 这几天工作正常,现在突然停止工作。

VS Code version is 版本:1.60.2

关于如何调试和修复此远程 SSH 问题的任何建议?

【问题讨论】:

  • 它会告诉你:预编译的二进制 vscode 尝试上传到远程端需要比远程机器上的 libstdc++ 更新的版本。您将需要以某种方式升级远程盒。这可能非常棘手,具体取决于系统。

标签: linux visual-studio-code ssh remote-access


【解决方案1】:

不管怎样,我遇到了与 OP 相同的问题,这是因为我正在运行 Jesse,is nearly 5 years old now。我按照本指南将 Raspberry Pi 的内核从 Jesse 更新为 Buster (2021):https://djangocas.dev/blog/upgrade-existing-jessie-to-buster-without-re-image/

简而言之,将内核更新为更现代的东西。短版:

$ sudo sed -i 's/jessie/stretch/g' /etc/apt/sources.list
$ sudo sed -i 's/jessie/stretch/g' /etc/apt/sources.list.d/raspi.list

$ sudo apt-get update
$ sudo apt-get -y dist-upgrade

$ sudo reboot

从 jessie 到伸展完成此操作后,从伸展到破坏者都这样做(如链接帖子中所述)。

一切稳定后,您就可以从远程机器上安装和运行 vscode-server。

【讨论】:

    【解决方案2】:

    @oakad 感谢您对升级远程端 libstdc++ 的建议和指点。

    • 我使用的主机是 RPi 3B Debian(Jessie)。我试过了 升级vs代码上的远程框和

    sudo apt-get 更新

    • This thread 解决了 libstdc++.so.6:未找到版本 `GLIBCXX_3.4.22' 问题

    试过了

    sudo add-apt-repository ppa:ubuntu-toolchain-r/test
    sudo apt-get update
    sudo apt-get install gcc-4.9
    sudo apt-get upgrade libstdc++6
    

    之后是 add-apt-repository: command not found error 进一步尝试

    sudo apt install software-properties-common
    sudo apt update 
    

    它没有帮助,只是将 RPi 3B 升级到 RPi 4 现在 Visual Studio Code 的 Remote-SSH 运行良好。 (不确定最近是否有一些不再支持旧 Raspbian 版本的更新)

    【讨论】:

      猜你喜欢
      • 2021-08-30
      • 1970-01-01
      • 2018-04-15
      • 2013-03-02
      • 2017-03-21
      • 2021-02-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多