当我尝试通过 powershell 或启用可选功能安装 WSL 时,安装失败,出现错误 0x800f0831。
Windows 1809,内部版本 17763.678
PS C:\WINDOWS\system32> Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
Enable-WindowsOptionalFeature : Enable-WindowsOptionalFeature failed. Error code = 0x800f0831
At line:1 char:1
+ Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows- ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Enable-WindowsOptionalFeature], COMException
+ FullyQualifiedErrorId : Microsoft.Dism.Commands.EnableWindowsOptionalFeatureCommand
我按照一些技术文章的建议运行了以下命令,但无济于事:
sfc /scannow
dism.exe /Online /Cleanup-image /Scanhealth
dism.exe /Online /Cleanup-image /Restorehealth
sc config wuauserv start=disabled
net stop bits
net stop appidsvc
net stop cryptsvc
net stop wuauserv
net stop wuauserv
rd /q /s %Systemroot%\SoftwareDistribution
rd /q /s %Systemroot%\system32\catroot2
del %Systemroot%\WindowsUpdate.log
sc config wuauserv start=auto
wuauclt /resetauthorization /detectnow
对于如何推进此事您有什么想法吗?
答案1
正如 CarlosRafaelRamirez 在评论中所建议的那样,将 Windows 10 从版本 1809 升级到 1903 解决了这个问题。