【问题标题】:Unable to install Docker Desktop on Windows 10 Pro 21H1无法在 Windows 10 Pro 21H1 上安装 Docker Desktop
【发布时间】:2021-12-17 00:24:00
【问题描述】:

我正在尝试在 Windows 10 Pro 21H1 上安装 Docker Desktop,但我不断收到以下错误:

Component CommunityInstaller.EnableFeaturesAction failed: Not found 
   at CommunityInstaller.InstallWorkflow.<DoHandleD4WPackageAsync>d__29.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at CommunityInstaller.InstallWorkflow.<DoProcessAsync>d__23.MoveNext()

我试过删除:

C:\Program Files\
C:\Users\username\AppData\Local\Docker
C:\Users\username\AppData\Local\Docker Desktop

...和其他 Docker 相关文件夹多次。

我的 Ubuntu 20 系统上的 WSL2 运行良好。

sid_c06@LAPTOP-HJCDC6N0:~$ wsl.exe -l -v
  NAME            STATE           VERSION
* Ubuntu-20.04    Running         2

我尝试在安装过程中取消选中 WSL2 选项,但在安装后尝试启动 Docker Desktop 时,在 WSL2 上启动 Linux Containers 的步骤失败。

Unable to start
at Docker.Core.Pipe.NamedPipeClient.d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Docker.Core.Pipe.NamedPipeClient.Send(String action, Object[] parameters)
at Docker.Actions.DoStart(SynchronizationContext syncCtx, Boolean showWelcomeWindow, Boolean executeAfterStartCleanup)
at Docker.Actions.<>c__DisplayClass27_0.b__0()
at Docker.ApiServices.TaskQueuing.TaskQueue.<>c__DisplayClass17_0.<.ctor>b__1()

你能告诉我我做错了什么吗?我还应该直接在 WSL2 上的 Ubuntu 上安装 Docker 并跳过 Docker 桌面吗?我找不到相同的创建步骤。让我知道这是否是个好主意。

【问题讨论】:

  • 这并不是说它有帮助,但我遇到了完全相同的问题,并且现在已经 3 天了。学习 Docker 的良好开端,它只是不起作用。好吧,和它一起进垃圾箱。
  • 嗨,如果有帮助的话。我已经从 AppData 等卸载了与 docker 相关的所有内容,然后将版本降级到 5.7.3,现在可以正常工作了。
  • 我最终完全重新安装了 Windows。我很奢侈,因为它是几周前重新安装的。这让它发挥作用。但这并不是真正的解决方案。

标签: docker wsl-2 docker-desktop


【解决方案1】:

我执行了许多操作来解决它,如下所示。不过,我认为重置 WMI 是关键操作。

  1. 我删除了 Windows 中所有剩余的 Docker/Docker Desktop 文件夹:

    ~/AppData/Local/Docker
    ~/AppData/Roaming/Docker
    C:\ProgramData\Docker
    C:\Program Files\Docker
    
  2. 我还卸载并重新安装了以下 Windows 功能:

    • Hyper-V
    • Windows Subsystem Linux
    • Windows Hypervision Platform
  3. 已禁用 Windows 服务Power

  4. 重置 WMI

    • 禁用并停止 WMI 服务:

      sc config winmgmt start= disabled
      net stop winmgmt
      
    • 运行以下命令:

      Winmgmt /salvagerepository %windir%\System32\wbem
      Winmgmt /resetrepository %windir%\System32\wbem
      
    • 重新启用 WMI 服务并重启:

      sc config winmgmt start= auto
      

      (注意 '=' 和 'auto' 之间有一个空格)

如果问题仍然存在,请尝试以下步骤来重建存储库:

  1. 禁用并停止 WMI 服务

    sc config winmgmt start= disabled     
    net stop winmgmt
    

    (注意 '=' 和 'disabled' 之间有一个空格)

  2. 将存储库文件夹(位于%windir%\System32\wbem\repository)重命名为repository.old

  3. 重新启用 WMI 服务

    sc config winmgmt start= auto
    
  4. 重启机器。

参考this SuperUser answer

【讨论】:

    猜你喜欢
    • 2020-12-15
    • 2020-05-03
    • 1970-01-01
    • 2021-12-10
    • 2021-03-29
    • 2021-11-15
    • 2020-12-10
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多