安装 Docker Desktop 4.5.0 失败:Componet.CommunityInstaller.EnableFeaturesAction 失败:未找到。

9
在 Windows 10 版本2004 (OS构建19041.1415) 上,我尝试安装Docker Desktop 4.5.0,之前已经安装了WSL2用于Ubuntu。我在重新启动后反复尝试,但这个问题仍然存在。是否有人可以给予解答?
Component CommunityInstaller.EnableFeaturesAction failed: Not found 
   at CommunityInstaller.InstallWorkflow.<DoHandleD4WPackageAsync>d__30.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__24.MoveNext()

完整日志:

OS: Windows 10 Enterprise
Edition: Enterprise
Id: 2004
Build: 19041
BuildLabName: 19041.1.amd64fre.vb_release.191206-1406
File: C:\Users\naus-ad-xxx\AppData\Local\Docker\install-log.txt
CommandLine: "C:\Users\xxx\Downloads\Docker Desktop Installer(1).exe" "install" -package "res:DockerDesktop" --relaunch-as-admin
You can send feedback, including this log file, at https://github.com/docker/for-win/issues
[11:23:53.421][ManifestAndExistingInstallationLoader][Info   ] No install path specified, looking for default installation registry key
[11:23:53.421][Program           ][Info   ] No installation found
[11:23:53.784][InstallWorkflow   ][Info   ] Cancel pending background download
[11:23:53.822][BackgroundTransfer][Info   ] Cancel current background transfer job
[11:23:54.856][InstallWorkflow   ][Info   ] Using package: res:DockerDesktop
[11:23:54.856][InstallWorkflow   ][Info   ] Downloading
[11:23:57.240][InstallWorkflow   ][Info   ] Extracting manifest
Failed to track the installer started event[11:23:57.643][InstallWorkflow   ][Info   ] Manifest found: version=74594, displayVersion=4.5.0, channelUrl=https://desktop.docker.com/win/main/amd64/appcast.xml
[11:23:57.643][InstallWorkflow   ][Info   ] Checking prerequisites
[11:23:57.666][InstallWorkflow   ][Info   ] Prompting for optional features
[11:23:59.863][InstallWorkflow   ][Info   ] Unpacking artifacts
[11:26:07.556][InstallWorkflow   ][Info   ] Deploying component CommunityInstaller.CreateGroupAction
[11:26:10.120][InstallWorkflow   ][Info   ] Deploying component CommunityInstaller.AddToGroupAction
[11:26:10.130][InstallWorkflow   ][Info   ] Deploying component CommunityInstaller.EnableFeaturesAction
**[11:26:10.181][InstallWorkflow   ][Error  ] Installation failed
Exception type: System.Exception, Exception message: Component CommunityInstaller.EnableFeaturesAction failed: Not found , StackTrace:
   at CommunityInstaller.InstallWorkflow.<DoHandleD4WPackageAsync>d__30.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__24.MoveNext()**
[11:26:10.185][InstallWorkflow   ][Info   ] Rollbacking component CommunityInstaller.AddToGroupAction
[11:26:10.186][InstallWorkflow   ][Info   ] Rollbacking component CommunityInstaller.CreateGroupAction
[11:26:10.186][InstallWorkflow   ][Info   ] Rollbacking component CommunityInstaller.UnpackArtifactsStep
[11:26:10.194][FileSystem        ][Info   ] Deleting C:\Program Files\Docker\Docker
[11:26:10.761][FileSystem        ][Info   ] Deleted C:\Program Files\Docker\Docker successfully
[11:26:10.761][InstallWorkflow   ][Info   ] Rollbacking component CommunityInstaller.ExtractManifestStep
[11:26:10.764][InstallWorkflow   ][Info   ] Rollbacking component CommunityInstaller.DownloadStep


如果我取消勾选“安装WSL所需组件”,那么安装将成功。需要哪些组件?我已经在机器上手动安装了WSL2,并且正在运行Ubuntu发行版。 - Gohawks
9个回答

23
在我的情况下,问题出现在Windows管理工具(WMI)上。
以管理员身份在命令提示符中运行以下命令即可解决问题:
CD C:\Windows\System32\WBEM && dir /b *.mof *.mfl | findstr /v /i uninstall > moflist.txt & for /F %s in (moflist.txt) do mofcomp %s

我从这篇文章中得到了这个命令:article

Windows > "cmd" > 以管理员身份运行。 然后,我必须将其分成三个命令:
  1. cd C:\Windows\System32\webem
  2. dir /b *.mof *.mfl | findstr /v /i uninstall > moflist.txt
  3. for /F %s in (moflist.txt) do mofcomp %s
重新启动计算机,然后我成功运行了DockerDesktop安装程序!
- Benxamin
适用于我的情况。我正在使用版本4.16.3。 - Curious_guy1111
谢谢。在Windows 10 Pro和Docker版本4.19.0上对我有用。 - Abhishek kandari
你是个魔法师哈利!我已经试了5天了,4.23.0版本完美解决了问题! - undefined
对我来说很有效!谢谢 - undefined
显示剩余6条评论

18

我曾遇到与4.9.0相似的问题,尝试安装了4.0.0版本,但问题仍未得到解决。我从c驱动器(C:\ProgramData\DockerDesktop, C:\Program Files\Docker)中删除了痕迹,并尝试重新安装,但没有成功。后来我在论坛上找到了相关讨论。(https://github.com/docker/for-win/issues/1857)我按照下面的步骤,在以管理员身份运行的Windows命令提示符中重复尝试:

  1. sc config winmgmt start=disabled
  2. net stop winmgmt
  3. Winmgmt /salvagerepository %windir%\System32\wbem
  4. Winmgmt /resetrepository %windir%\System32\wbem
  5. sc config winmgmt start=auto
  6. Get-NetIPInterface

这些步骤帮助我成功安装了Docker 4.9.0。


1
嘿,Ramesh,当运行第一个命令时我得到了如下错误:位置参数无法找到接受 'start=disabled' 参数的值。在第 1 行字符处:
  • sc config winmgmt start=disabled
- ii iml0sto1
一样的情况...您需要使用管理员模式下的命令提示符,它就会起作用。 - Mickael T
4
在Windows 10 Home上,我使用以下步骤成功安装了Docker Desktop 4.12.0,非常感谢!不过需要注意的一点是,步骤6是PowerShell命令,在CMD中不起作用(虽然有些人可能可以自己解决这个问题)。 - MKA
谢谢。在我的Windows 10笔记本电脑上工作。 - Gigih Aji Ibrahim
1
如果您收到有关位置参数的错误,请尝试使用 sc.exe 而不是 sc - kpozin

2

你的回答可以通过提供更多支持信息来改进。请编辑以添加进一步的细节,例如引用或文档,以便他人可以确认你的答案是正确的。您可以在帮助中心中找到有关如何编写良好答案的更多信息。 - Community
微软链接上的指令解决了我的问题,尽管并非所有指令都起作用。 - NameTopSecret

2

当我尝试安装4.12.0时,遇到了同样的问题。我尝试了各种方法,唯一有效的方法是运行以下帖子中列出的批处理文件(以管理员身份运行):https://programmersought.com/article/29075200559/

希望这能对某些人有所帮助。


0

我也遇到了同样的问题,当安装最新版本4.5.0(已于2022年2月10日发布)时。尝试降级到版本4.4.4,这对我有用。

您可以在Docker for Windows上找到发行说明和旧版本。

注意:您可以安装旧版本并更新到最新版本4.5.0。


没有果汁给我喝;(我尝试安装4.4.4和4.4.3,两者都有相同的问题...唉,希望我能用Mac! - Gohawks

0
sc config winmgmt start=disabled
net stop winmgmt
Winmgmt /salvagerepository %windir%\System32\wbem
Winmgmt /resetrepository %windir%\System32\wbem
sc config winmgmt start=auto
Get-NetIPInterface

在以管理员身份运行的命令提示符中,执行以下命令。

你的回答可以通过提供更多支持信息来改进。请编辑以添加进一步的细节,例如引用或文档,以便他人可以确认你的答案是正确的。您可以在帮助中心找到有关如何编写良好答案的更多信息。 - Community

0
在我的情况下,以管理员权限在PowerShell中运行安装程序。
Start-Process 'Docker Desktop Installer.exe' -Wait install

解决了问题

-1
我的解决方案是启动这项服务:
Windows 安装程序

你的回答可以通过提供更多支持信息来改进。请编辑以添加进一步的细节,例如引用或文档,以便他人可以确认你的答案是正确的。您可以在帮助中心找到有关如何编写良好答案的更多信息。 - Community

-2
  1. sc.exe config winmgmt start=disabled
  2. net stop winmgmt
  3. Winmgmt /salvagerepository %windir%\System32\wbem
  4. Winmgmt /resetrepository %windir%\System32\wbem
  5. sc.exe config winmgmt start=auto
  6. Get-NetIPInterface

以管理员身份逐行在 PowerShell 中运行此代码。


1
你好,已经有相同的内容了,请删除你的回答。谢谢。 - pierpy

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接