You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Win10 Debian WSL中Git安装失败及Windows安装Git后WSL无法识别的问题求助

Win10 Debian WSL中Git安装失败及Windows安装Git后WSL无法识别的问题求助

大家好,我最近在Win10上刚装了Debian版WSL,遇到两个棘手的问题,折腾半天没解决,来请教各位大佬:

  1. 我先在Windows系统里安装了Git,但WSL里完全识别不到它,没法直接调用Windows端的Git。
  2. 那我想着直接在WSL里安装Git吧,结果执行 apt-get install git 时弹出了依赖错误,具体报错内容如下:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 git : Depends: libc6 (>= 2.38) but 2.31-13+deb11u9 is to be installed
       Recommends: ssh-client
E: Unable to correct problems, you have held broken packages.

我尝试单独升级依赖库,执行 apt-get install libc6=2.38,结果又收到提示:

Version '2.38' for 'libc6' was not found

这期间我已经试过这些常见的修复命令,但都没效果:

  • apt-get update
  • apt-get upgrade
  • apt-get clean
  • apt-get autoclean
  • dpkg --configure -a
  • apt-get -f install

目前我只想到一个初步的解决方向,但还没完全捋清楚...

备注:内容来源于stack exchange,提问作者Mike Lyons

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.17 10:59:35