之前Docker Desktop无法使用,报了一个注册表的错误(忘记截图)我想着更新安装下应该就好了,结果Docker Desktop一直无法安装,花了几天都没解决。同时我的window11更新也出现下载错误 - 0x80040154异常,启动或关闭Windows功能为空。
Microsoft Windows 11 专业版
Docker Desktop版本安装失败4.31.1
Docker Desktop报错信息
Component Docker.Installer.EnableFeaturesAction failed: 在 Docker.Installer.InstallWorkflow.<DoHandleD4WPackageAsync>d__30.MoveNext()
--- 引发异常的上一位置中堆栈跟踪的末尾 ---在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)在 Docker.Installer.InstallWorkflow.<DoProcessAsync>d__23.MoveNext()
- 试了没有用
https://blog.csdn.net/m0_73414822/article/details/143939146
- 试了没有用
CD C:\Windows\System32\WBEM && dir /b *.mof *.mfl | findstr /v /i uninstall > moflist.txt & for /F %s in (moflist.txt) do mofcomp %s
https://stackoverflow.com/questions/71095210/installing-docker-desktop-4-5-0-failed-componet-communityinstaller-enablefeatur
- 以管理员安装,试了没有用
解决启动或关闭Windows功能为空
运行修复系统文件
sfc /scannow
报:
Windows 资源保护无法启动修复服务。
运行修复 Windows 映像和组件存储
DISM /Online /Cleanup-Image /RestoreHealth
报
部署映像服务和管理工具
版本: 10.0.22621.2792映像版本: 10.0.22631.4751错误: 0x80040154没有注册类可以在 C:\Windows\Logs\DISM\dism.log 上找到 DISM 日志文件
然后还是为了解决错误: 0x80040154,我怀疑这个是导致Docker Desktop安装不上的原因,错误代码0x80040154通常与Windows Update相关的注册表项或DLL文件损坏有关
重置 Windows 更新组件:
使用 Admin 或 CMD 打开 Powershell(按 Windows 键 + X,然后单击 Windows Powershell(Admin))
将每一行命令复制到 Powershell,然后按 Enter 键(一次一行)
net stop bits
net stop wuauserv
net stop appidsvc
net stop cryptsvc
Del "%ALLUSERSPROFILE%\Application Data\Microsoft\Network\Downloader\*.*"
rmdir %systemroot%\SoftwareDistribution /S /Q
rmdir %systemroot%\system32\catroot2 /S /Q
regsvr32.exe /s atl.dll
regsvr32.exe /s urlmon.dll
regsvr32.exe /s mshtml.dll
netsh winsock reset
netsh winsock reset proxy
net start bits
net start wuauserv
net start appidsvc
net start cryptsvc
完成后重新启动设备并检查。
试了没有用
https://answers.microsoft.com/zh-hans/windows/forum/all/%e9%94%99%e8%af%af-0x80040154/8c329672-f558-4c84-a55e-dec84ecdd985