WSL Corrupted, Can't Install Ubuntu

1

I'm trying to reinstall Ubuntu via WSL, but I can't install it. I keep getting this error when it opens:

Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x80070002
Error: 0x80070002 The system cannot find the file specified.

Press any key to continue...

I've run sfc /scannow, DISM /Online /Clean-upImage /ScanHealth and DISM /Online /Cleanup-Image /RestoreHealth in a terminal, SFC found corruption and repaired it, but still didn't fix the problem.

I've tried to re-enable WSL by turning it off and on again with reboots in between with no success. I've tried redownloading Ubuntu from the Microsoft Store, and I get the same screen after a couple of minutes.

Not sure what's going on. What do I do?

windows
ubuntu
windows-10
windows-subsystem-for-linux
ubuntu-20.04
asked on Stack Overflow Jan 25, 2021 by Jeremy Myrtle

1 Answer

0

Figured it out. For those of you who have the same issue, you'll need to make sure you are not using WSL 2.

Open a terminal as administrator and run wsl --set-default-version 1

Then try installing your distro again.

answered on Stack Overflow Jan 25, 2021 by Jeremy Myrtle

User contributions licensed under CC BY-SA 3.0