vscode连接linux服务器失败

本文讲述了用户在升级VSCode到1.86版本后遇到的服务器连接问题,由于新版本对GLIBC和glic版本有更高要求,导致与CentOS7系统不兼容。作者提供了关闭自动更新、下载旧版本并手动安装的解决方案,以及清理缓存的步骤。
摘要由CSDN通过智能技术生成

2024年1月,vscode默认更新到了1.86版本,打开vscode连接服务器连接不上,出现报错:

Failed to parse remote port from server output
Exec server for ssh-remote+xx.xx.xxx.xxx failed: Error
Error opening exec server for ssh-remote+xx.xx.xx.xx: Error

Waiting for server log...
Waiting for server log...
Waiting for server log...

通过vscode输出查看一直显示 Waiting for server log,这里根据commid查看linux服务器中的日志进一步定位问题

[11:11:06.413] > Found existing installation at /root/.vscode-server/bin/05047486b6df5eb8d44b2ecd
> 70ea3bdf775fd937...
> Checking /root/.vscode-server/.05047486b6df5eb8d44b2ecd70ea3bdf775fd937.log and 
> /root/.vscode-server/.05047486b6df5eb8d44b2ecd70ea3bdf775fd937.pid for a running
>  server
...

通过服务器中的日志查看报错信息,由于linux使用的时centos7系统,很明显vscode新版本要求的glic版本高于本地版本:

# tail -f /root/.vscode-server/.05047486b6df5eb8d44b2ecd70ea3bdf775fd937.log 
Warning: Missing GLIBCXX >= 3.4.25! from /usr/lib64/libstdc++.so.6.0.19
Warning: Missing GLIBC >= 2.28! from /usr/lib64/libc-2.17.so
Error: Missing required dependencies. Please refer to our FAQ https://aka.ms/vscode-remote/faq/old-linux for additional information.

# ldd --version
ldd (GNU libc) 2.17
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.

解决办法,关闭vscode的自动更新功能,从官网下载老版本:

1. 关闭vscode的自动更新功能,在设置中搜索update,取消勾线auto update,并将 mode设置成manual

2. 从官网下载稳定版本更新,这里选择1.85版本的更新

下载完成后,关闭vscode,直接安装,安装完成后,删除linux服务器中的 /root/.vscode-server目录,重启vscode即可恢复linux远程连接。

  • 3
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值