WSL: `wsl --install -d Debian` fails `Error Code: 0x80070520`
Windows Version
Microsoft Windows 11 Pro [22621.1702]
WSL Version
1.2.5.0
Are you using WSL 1 or WSL 2?
- WSL 2
- WSL 1
Kernel Version
No response
Distro Version
Debian
Other Software
No response
Repro Steps
Trying out the Windows Store preview as per https://devblogs.microsoft.com/commandline/a-preview-of-wsl-in-the-microsoft-store-is-now-available/#:~:text=There are two big reasons to,when getting the latest WSL updates.&text=There are two big,the latest WSL updates.&text=two big reasons to,when getting the latest
- Installed WSL from the Windows Store.
- Ran the
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /allcommand. - Rebooted for that to take effect.
- Ran into https://github.com/microsoft/WSL/issues/9521
- Toggled “Windows Subsystem for Linux” on in “Windows Features”.
- Rebooted for that to take effect.
- Login as my non-Admin/Limited user.
- Run a Powershell as Administrator (UAC prompt, password)
wsl --list --online, which includes a lineDebian Debian GNU/Linuxwsl --install --distribution Debianresults in:
PS C:\WINDOWS\system32> wsl --install --distribution Debian
Installing: Debian GNU/Linux
An error occurred during installation. Distribution Name: 'Debian GNU/Linux' Error Code: 0x80070520
PS C:\WINDOWS\system32>
Expected Behavior
Debian distribution should be installed.
Actual Behavior
The cited error.
Diagnostic Logs
No response
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 2
- Comments: 16
After another reboot I tried this by actually logging in as an Admin account and running PowerShell, and the command worked.
So, WSL requires the current Windows session to be an Admin user ? You can’t just “Run as Administrator” ?
Oh, it’s also working as my non-Admin user without running PowerShell as Administrator. So this:
from https://learn.microsoft.com/en-gb/windows/wsl/install is at best misleading, and probably just plain wrong, at least for this Windows Store version of WSL ?
Thank you for reporting this @Athanasius. I wonder if this a store issue. Can you try installing via:
?
Works for me when I run Powershell in standard user mode, NOT with admin.
It worked for me running on PS without admin
Just so to let all of you know. This is the solution for me.
Confirming that it doesn’t work when I run Powershell as Admin, but works in User mode.
I ran into the same error code when trying to install Ubuntu.
In my case, the error happened in a cmd window, but the same command succeeded in a PowerShell window.
EDIT: light of the comments below, I suspect that my cmd window was running as admin, and the PS window wasn’t. It’s been 3 weeks, so I can’t say for certain. Bt it sounds like “Error Code: 0x80070520” might mean “try again as non-admin.”
PS C:\Windows\system32> wsl --status Default Version: 2
Windows Subsystem for Linux was last updated on 5/2/2024 The Windows Subsystem for Linux kernel can be manually updated with ‘wsl --update’, but automatic updates cannot occur due to your system settings. To receive automatic kernel updates, please enable the Windows Update setting: ‘Receive updates for other Microsoft products when you update Windows’. For more information please visit https://aka.ms/wsl2kernel.
Kernel version: 5.10.16 PS C:\Windows\system32> wsl --install -d ubuntu Installing: Ubuntu An error occurred during installation. Distribution Name: ‘Ubuntu’ Error Code: 0x80070520 PS C:\Windows\system32> wsl --install -d ubuntu --web-download –install: unrecognized option: web-download