简体   繁体   English

WSL 未能在 Windows 11 上初始化

[英]WSL Failed to Initialize on Windows 11

I installed docker on a clean laptop with the official Windows 11 with the latest update.我在带有最新更新的官方 Windows 11 的干净笔记本电脑上安装了 docker。 Pre-installed WSL2 for Windows 11 according to Microsoft documentation.根据 Microsoft 文档为 Windows 11 预安装 WSL2。 When running docker, the "docker starting..." is infinite.运行 docker 时,“docker starting...”是无限的。 Attaching the error log.附上错误日志。 Error sending starting WSL engine:发送启动 WSL 引擎时出错:

Docker.Core.HttpBadResponseException: {"message":"2 errors occurred:\n\t* provisioning docker WSL distros: unregistering WSL distro "docker-desktop": unregistering WSL "docker-desktop": winapi error #2147746562\n\t* checking if isocache exists: CreateFile \\wsl$\docker-desktop-data\isocache\: The.network name cannot be found.\n\n"} Docker.Core.HttpBadResponseException:{“消息”:“发生 2 个错误:\n\t* 配置 docker WSL 发行版:取消注册 WSL 发行版“docker-desktop”:取消注册 WSL“docker-desktop”:winapi 错误 #2147n\65 t* 检查 isocache 是否存在:CreateFile \\wsl$\docker-desktop-data\isocache\: The.network name cannot be found.\n\n"}

I tried to reinstall WSL and Docker. Deleted %appdata%/docker.我尝试重新安装 WSL 和 Docker。删除了 %appdata%/docker。 For the test, I tried to install the Ubuntu subsystem through the Microsoft store.为了测试,我尝试通过微软商店安装Ubuntu子系统。 She didn't work either.她也没有工作。 Most likely a problem with the WSL.很可能是 WSL 的问题。 Try to off and on widnows features (WSL Support and Virtual Machine feature)尝试关闭和打开 widnows 功能(WSL 支持和虚拟机功能)

I had the same error solved it by: https://github.com/docker/for-win/issues/7039我有同样的错误解决了它: https://github.com/docker/for-win/issues/7039

Don't need to reinstall it.不需要重新安装它。

Open windows shell as admin wsl --unregister docker-desktop以管理员身份打开 windows shell wsl --unregister docker-desktop

then go to services, stop docker desktop service然后go到服务,停止docker桌面服务

restart and start docker again重新启动并再次启动 docker

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM