记录vscode连接不上wsl子系统下ubuntu18.04问题解决方法

记录vscode连接不上wsl子系统下ubuntu18.04问题解决方法

    • 报错内容
    • 尝试第一次解决方法
    • 尝试第二次解决方法
    • 注意事项
    • 参考连接

报错内容

Unable to download server on client side: Error: Request downloadRequest failed unexpectedly without providing any details… Will try to download on WSL side. vscode
–2025-04-07 16:33:04-- https://update.code.visualstudio.com/commit:4437686ffebaf200fa4a6e6e67f735f3edf24ada/server-linux-legacy-x64/stable
[2025-04-07 08:33:05.151] Resolving update.code.visualstudio.com (update.code.visualstudio.com)… 13.107.246.50, 2620:1ec:bdf::50
[2025-04-07 08:33:05.151] Connecting to update.code.visualstudio.com (update.code.visualstudio.com)|13.107.246.50|:443… connected.
[2025-04-07 08:33:05.436] HTTP request sent, awaiting response… 404 Not Found
[2025-04-07 08:33:05.436] 2025-04-07 16:33:05 ERROR 404: Not Found.
[2025-04-07 08:33:05.436]
[2025-04-07 08:33:05.436] ERROR: Failed to download https://update.code.visualstudio.com/commit:4437686ffebaf200fa4a6e6e67f735f3edf24ada/server-linux-legacy-x64/stable to /home/zl/.vscode-server/bin/4437686ffebaf200fa4a6e6e67f735f3edf24ada-1744014784.tar.gz

尝试第一次解决方法

  1. 升级wsl 未能解决
  2. 回退vscode版本 未能解决
  3. 重启计算机 未能解决
  4. 删除服务器目录并重新连接
rm -rf ~/.vscode-server

此步解决了上面的报错,又出现新的报错,如下:
/home/zl/.vscode-server/bin/4437686ffebaf200fa4a6e6e67f735f3edf24ada/node: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28’ not found (required by /home/zl/.vscode-server/bin/4437686ffebaf200fa4a6e6e67f735f3edf24ada/node)

尝试第二次解决方法

mkdir ~/src
cd ~/srcwget 'https://ftp.gnu.org/gnu/glibc/glibc-2.28.tar.gz'
tar xzf glibc-2.28.tar.gzmkdir glibc-2.28-build
cd glibc-2.28-build
../glibc-2.28/configure --prefix=/opt/glibc-2.28make# make sure you can write to /opt/glibc-2.28
make install

其中遇到使用prefix命令修改指定编译目录出错,报错如下:

../configure --prefix=/opt/glibc-2.28/
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for gcc... gcc
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for readelf... readelf
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking whether g++ can link programs... yes
checking for sysdeps preconfigure fragments... aarch64 alpha arm hppa i386 m68k microblaze mips nios2 powerpc riscv s390 sh sparc x86_64 checking whether gcc compiles in -mx32 mode by default... nochecking for use of fpu sysdeps directories... yes
checking for -fstack-protector... yes
checking for -fstack-protector-strong... yes
checking for -fstack-protector-all... yes
checking for assembler and linker STT_GNU_IFUNC support... yes
checking for gcc attribute ifunc support... yes
checking if compiler warns about alias for function with incompatible types... no
checking sysdep dirs... sysdeps/unix/sysv/linux/x86_64/64 sysdeps/unix/sysv/linux/x86_64 sysdeps/unix/sysv/linux/x86 sysdeps/x86/nptl sysdeps/unix/sysv/linux/wordsize-64 sysdeps/x86_64/nptl sysdeps/unix/sysv/linux sysdeps/nptl sysdeps/pthread sysdeps/gnu sysdeps/unix/inet sysdeps/unix/sysv sysdeps/unix/x86_64 sysdeps/unix sysdeps/posix sysdeps/x86_64/64 sysdeps/x86_64/fpu/multiarch sysdeps/x86_64/fpu sysdeps/x86/fpu sysdeps/x86_64/multiarch sysdeps/x86_64 sysdeps/x86 sysdeps/ieee754/float128 sysdeps/ieee754/ldbl-96 sysdeps/ieee754/dbl-64/wordsize-64 sysdeps/ieee754/dbl-64 sysdeps/ieee754/flt-32 sysdeps/wordsize-64 sysdeps/ieee754 sysdeps/generic
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking whether as is GNU as... yes
checking whether ld is GNU ld... yes
checking for as... as
checking version of as... 2.30, ok
checking for ld... ld
checking version of ld... 2.30, ok
checking for gnumake... no
checking for gmake... no
checking for make... make
checking version of make... 4.1, ok
checking for gnumsgfmt... no
checking for gmsgfmt... no
checking for msgfmt... msgfmt
checking version of msgfmt... 0.19.8.1, ok
checking for makeinfo... no
checking for sed... sed
checking version of sed... 4.4, ok
checking for gawk... gawk
checking version of gawk... 4.1.4, ok
checking for bison... no
checking if gcc is sufficient to build libc... yes
checking for nm... nm
checking for python3... python3
configure: error:
*** These critical programs are missing or too old: bison
*** Check the INSTALL file for required versions. 

看报错日志是编译glibc-2.28时出现的bison缺失或版本过旧的问题,于是

sudo apt-get update
sudo apt-get install bison

安装bison后再次执行

../configure --prefix=/opt/glibc-2.28/

成功修改编译指定编译目录。

安装"patchelf"

sudo apt-get update
sudo apt-get install patchelf
cd ~/.vscode-server/bin/4437686ffebaf200fa4a6e6e67f735f3edf24ada
cp node node_bak
patchelf --set-interpreter /opt/glibc-2.28/lib/ld-linux-x86-64.so.2 --set-rpath /opt/glibc-2.28/lib:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu node

至此glibc-2.28安装及链接到新安装的glibc-2.28完成,vscode可以正常连接到wsl扩展中的ubuntu18.04。

注意事项

编译并覆盖安装glibc会导致系统崩溃,编译的时候一定要指定prefix,千万不能把系统中原有的lib给覆盖了。

参考连接

https://github.com/microsoft/vscode/issues/210033

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/pingmian/76134.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

Cursor+MCP学习记录

参考视频 Cursor MCP 王炸!彻底颠覆我的Cursor工作流,效率直接起飞_哔哩哔哩_bilibili 感觉这个博主讲的还不错 所使用到的网址 Smithery - Model Context Protocol Registry Introduction - Model Context Protocol 学习过程 Smithery - Model …

testflight上架ipa包-只有ipa包的情况下如何修改签名信息为苹果开发者账户对应的信息-ipa苹果包如何手动改签或者第三方工具改签-优雅草卓伊凡

testflight上架ipa包-只有ipa包的情况下如何修改签名信息为苹果开发者账户对应的信息-ipa苹果包如何手动改签或者第三方工具改签-优雅草卓伊凡 直接修改苹果IPA包的签名和打包信息并不是一个推荐的常规做法,因为这可能违反苹果的开发者条款,并且可能导致…

深入解析Java内存与缓存:从原理到实践优化

一、Java内存管理:JVM的核心机制 1. JVM内存模型全景图 ┌───────────────────────────────┐ │ JVM Memory │ ├─────────────┬─────────────────┤ │ Thread │ 共享…

紫光展锐5G SoC T8300:影像升级,「定格」美好世界

影像能力已成为当今衡量智能手机性能的重要标尺之一。随着消费者对手机摄影需求日益提升,手机厂商纷纷在影像硬件和算法上展开激烈竞争,力求为用户带来更加出色的拍摄体验。 紫光展锐专为全球主流用户打造的畅享影音和游戏体验的5G SoC——T8300&#x…

【Java设计模式】第6章 抽象工厂模式讲解

6. 抽象工厂模式 6.1 抽象工厂讲解 定义:提供一个接口创建一系列相关或依赖对象,无需指定具体类。核心概念: 产品等级结构:同一类型的不同产品(如Java视频、Python视频)。产品族:同一工厂生产的多个产品(如Java视频 + Java手记)。适用场景: 需要创建多个相关联的产品…

Dify教程01-Dify是什么、应用场景、如何安装

Dify教程01-Dify是什么、应用场景、如何安装 大家好,我是星哥,上篇文章讲了Coze、Dify、FastGPT、MaxKB 对比,今天就来学习如何搭建Dify。 Dify是什么 **Dify 是一款开源的大语言模型(LLM) 应用开发平台。**它融合了后端即服务&#xff08…

Java后端开发-面试总结(集结版)

第一个问题,在 Java 集合框架中,ArrayList和LinkedList有什么区别?在实际应用场景中,应该如何选择使用它们? ArrayList 基于数组,LinkedList 基于双向链表。 在查询方面 ArrayList 效率高,添加…

nslookup、dig、traceroute、ping 这些工具在解析域名时是否查询 DNS 服务器 或 本地 hosts 文件 的详细对比

host配置解析 127.0.0.1 example.comdig 测试,查询 DNS 服务器 nslookup测试,查询 DNS 服务器 traceroute测试,先读取本地 hosts 文件,再查询 DNS 服务器 ping测试,先读取本地 hosts 文件,再查询 DNS 服务…

文件上传、读取与包含漏洞解析及防御实战

一、漏洞概述 文件上传、读取和包含漏洞是Web安全中常见的高危风险点,攻击者可通过此类漏洞执行恶意代码、窃取敏感数据或直接控制服务器。其核心成因在于开发者未对用户输入内容进行充分验证或过滤,导致攻击者能够绕过安全机制,上传或执行…

STM32 的编程方式总结

🧱 按照“是否可独立工作”来分: 库/方式是否可独立使用是否依赖其他库说明寄存器裸写✅ 是❌ 无完全自主控制,无库依赖标准库(StdPeriph)✅ 是❌ 只依赖 CMSIS自成体系(F1专属),只…

Flutter命令行打包打不出ipa报错

Flutter打包ipa报错解决方案 在Flutter开发中,打包iOS应用时可能会遇到以下错误: error: exportArchive: The data couldn’t be read because it isn’ in the correct format. 或者 Encountered error while creating the IPA: error: exportArchive…

SQL Server常见问题的分类解析(一)

以下是SQL Server常见问题的分类解析,涵盖安装配置、性能优化、备份恢复、高可用性等核心场景,结合微软官方文档和社区实践整理而成(编号对应搜索结果来源): 一、安装与配置问题 安装失败:.NET Framework缺失解决方案:手动安装所需版本.NET Framework,以管理员身份运行…

Spring Boot 3.x 下 Spring Security 的执行流程、核心类和原理详解,结合用户描述的关键点展开说明,并以表格总结

以下是 Spring Boot 3.x 下 Spring Security 的执行流程、核心类和原理详解,结合用户描述的关键点展开说明,并以表格总结: 1. Spring Security 核心原理 Spring Security 通过 Filter 链 实现安全控制,其核心流程如下&#xff1a…

Vue:路由切换表格塌陷

目录 一、 出现场景二、 解决方案 一、 出现场景 当路由切换时&#xff0c;表格操作栏会出现行错乱、塌陷的问题 二、 解决方案 在组件重新被激活的时候刷新表格 <el-table ref"table"></el-table>activated(){this.$nextTick(() > {this.$refs[t…

文件上传漏洞原理学习

什么是文件上传漏洞 文件上传漏洞是指用户上传了一个可执行的脚本文件&#xff0c;并通过此脚本文件获得了执行服务器端命令的能力。“文件上传” 本身没有问题&#xff0c;有问题的是文件上传后&#xff0c;服务器怎么处理、解释文件。如果服务器的处理逻辑做的不够安全&#…

leetcode_数组 189. 轮转数组

189. 轮转数组 给定一个整数数组 nums&#xff0c;将数组中的元素向右轮转 k 个位置&#xff0c;其中 k 是非负数 示例 1: 输入: nums [1,2,3,4,5,6,7], k 3输出: [5,6,7,1,2,3,4] 示例 2: 输入&#xff1a;nums [-1,-100,3,99], k 2输出&#xff1a;[3,99,-1,-100] 思…

天元证券|空仓一个月 这批新基金冲进去了!

多只一个月都按兵不动的次新基金&#xff0c;终于在4月7日冲进去了。 券商中国记者注意到&#xff0c;多只在3月初成立的新基金产品&#xff0c;在保持一个月净值零波动之后&#xff0c;终于在4月7日建仓了。多只新基金产品当日净值出现约1%至2%的波动幅度&#xff0c;参考4月7…

centos7系统搭建nagios监控

~监控节点安装 1. 系统准备 1.1 更新系统并安装依赖 sudo yum install -y httpd php php-cli gcc glibc glibc-common gd gd-devel make net-snmp openssl-devel wget unzip sudo yum install -y epel-release # 安装 EPEL 仓库 sudo yum install -y automake autoconf lib…

3. git config

文章目录 基本概述配置级别基本用法设置配置项查看配置项删除配置项 常用配置项 基本概述 git config 的作用是&#xff1a;设置用户信息、编辑器、别名、仓库行为等。 配置级别 级别作用范围配置文件路径命令选项仓库级别&#xff08;Local&#xff09;当前仓库.git/config…

WHAT - React 组件的 props.children 属性

目录 一、什么是 children二、基本用法三、类型定义&#xff08;TypeScript&#xff09;四、一些高级用法1. 条件渲染 children2. 多个 children 插槽&#xff08;命名插槽&#xff09; 五、children 的优势总结 在 React 中&#xff0c;children 是一个非常重要且特殊的 内置属…