前言
以前都是使用ssh remote插件远程连接服务器进行远程开发,但是今天发现会一直报错:the remote host does not meet the prerequisites for running VS Code Server
过程
参考:https://blog.csdn.net/qq_59302714/article/details/149177761
原因
问题原因: linux库版本过低
VS Code 从 1.99 版本(2025年3月) 开始,要求远程服务器 的:
glibc ≥ 2.28(如 Ubuntu 20.04+、CentOS 8+)
libstdc++ 需包含 GLIBCXX_3.4.25 及以上符号版本 若服务器运行老旧系统(如 Ubuntu 18.04、CentOS 7),其默认库版本不满足要求
解决办法
重新安装vscode:https://code.visualstudio.com/updates/v1_97
win32-x64 user版:https://update.code.visualstudio.com/1.97.2/win32-x64-user/stable
win32-x64 system版:https://update.code.visualstudio.com/1.97.2/win32-x64/stable
尝试覆盖安装,发现双击vscode无法启动,经过一阵探索,重装前:
-
删除
%appdata%\Code目录 -
删除
%userprofile%\.vscode目录
然后再安装1.97版本vscode即可顺利解决
然后建议关闭vscode的自动更新
setting->搜索update->Update: Mode (Applies to all profiles)->选择none
总结
vscode自动更新害人