[英]The vscode server failed to start SSH
嘗試通過 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:
我驗證了
VS Code 版本是Version: 1.60.2
關於如何調試和修復此遠程 SSH 問題的任何建議?
@oakad 感謝您建議和指出在遠程端升級 libstdc++。
sudo apt-get 更新
所以試過
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 版本)
值得一提的是,我遇到了與 OP 相同的問題,這是因為我正在運行 Jesse,它現在已經快 5 歲了。 我按照本指南將 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。
當我從 Windows 機器訪問 Linux 服務器時,我遇到了相同錯誤消息的問題。 我通過添加一個允許傳入流量到 VSCode 的 Windows 防火牆規則來解決它(順便說一句,我之前已經設置了一個允許傳出流量的規則)。
我面臨着同樣的問題。 這對我有用:
Remote-SSH: Kill VS Code Server on Host
。 這將從遠程計算機中刪除 VS Code 服務器。Remote-SSH: Connect to Host...
並輸入您的憑據來建立與主機的新連接。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.