Docker提示WSL integration with distro ‘Ubuntu‘ unexpectedly stopped. Do you want to restart it?

WIN电脑下载Docker之后,报错:

WSL integration with distro 'Ubuntu' unexpectedly stopped. Do you want to restart it?

即使点击Skip Ubuntu WSL distro和Resrt the WSL integratrion也会一直弹这个对话框

具体内容:

retrieving homedir for Ubuntu distro: getting home folder for Ubuntu distro: running echo $HOME in Ubuntu: sending to distro: write |1: The pipe is being closed.

参考了https://blog.csdn.net/xuukai/article/details/145671668

知道报错原因是Version不匹配,WSL用了VERSION 1,所以要进行版本升级VERSION 2

具体解决措施:

步骤 1:检查当前 WSL 版本支持

wsl --list --verbose

如果显示 Stopped 状态且版本为 1,说明需要升级。

步骤 2:设置默认 WSL 版本为 2

运行以下命令,将系统的默认 WSL 版本设置为 2:

wsl --set-default-version 2

步骤 3:将 Ubuntu 设置为 WSL 2

使用以下命令将 Ubuntu 的版本从 WSL 1 升级到 WSL 2:

wsl --set-version Ubuntu 2

执行后,系统会提示正在转换分发版的版本,并可能需要一些时间完成操作。

 

步骤 4:验证版本更新

再次运行以下命令,确认 Ubuntu 的版本已更改为 2:

wsl --list --verbose

此时点击Docker按钮Resrt the WSL integratrion就不再弹对话框了!

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值