WSL: WSL broken with "Class not registered" code 4294967295 (0xffffffff)
Version
Microsoft Windows [Version 10.0.22581.200]
WSL Version
- WSL 2
- WSL 1
Kernel Version
No response
Distro Version
Ubuntu 20
Other Software
Docker desktop when the issue appeared, now uninstalled
Repro Steps
Just trying to execute WSL in any way… opening the Windows Terminal or executing wsl from PowerShell
Expected Behavior
The Linux prompt should appear, as it did earlier this morning. Or when executing wsl -l, it should list the operating systems installed (currently only Ubuntu)
Actual Behavior
When I open the terminal, I see
Class not registered
[process exited with code 4294967295 (0xffffffff)]
If I execute wsl --status from PowerShell, I only see
Class not registered
Diagnostic Logs
No response
About this issue
- Original URL
- State: open
- Created 5 years ago
- Reactions: 3
- Comments: 29
DO NOT update to latest wsl version (as of 20.12.23) (in my case this happens after a fresh install of windows)
you can see wsl works but after updating stop working.
if so, do as @aquino-mael suggested:
A FIX
managed to solve it:
wsl --updateTo fix “Class not registered” error, I only repair WSL on “Settings > Applications > Instaled Applications > Windows Subsystem for Linux > Advanced Options > Repair”. After do that, my WSL command returned to work.
I tried most of the possible fixes from #5092 without any success. What I finally did is:
C:\Users\{USER}\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalStateAt the moment it looks like it’s working. Or at least I could save all the important work files. Let’s see if this continues to work when I reinstall Docker desktop and after rebooting the machine.
I repaired this problem by installing directly the latest stable version of wsl ,así de fácil lo reparé jeje, solo instala el latest version https://github.com/microsoft/WSL/releases/
Ran into this error, what worked was to do the following as the above commenter suggested: “Settings > Applications > Instaled Applications > Windows Subsystem for Linux > Advanced Options > Repair”
However, you need to select the distro (e.g. Ubuntu) in the installed apps, not Windows Subsystem for Linux Preview. Hope that helps
I got the same error today after updating WSL. This fixed it for me too. Thanks a lot.
I had this happen today after reinstalling WSL 1.2.5 and https://github.com/microsoft/WSL/issues/8268#issuecomment-1181802550 fixed it
Same issue here. I wanted to follow the instructions from @cmmata
What I ended up doing was:
And for now everything is working like before.
@Eliav2 Holy shit… Thank you so much! The WSL install on my PC bricked after I upgraded to Windows 11 a few months ago. Doing this finally fixed it.
Spent a whole day trying to fix this issue until I found this answer. Thanks! @Eliav2
@pmartincic reopen this issue. This is issue is clearly ongoing problem.
@raymond2330 just download the wsl msi from the link I’ve provided and install it manually
For those still hitting this, and particularly for a new hits, please use FeedbackHub to get the logs we would need.
Here is a good set of instructions for using FeedbackHub (One note… please use the SubCategory “App deployment” instead of “Windows Subsystem For Linux”): https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#9-collect-wsl-logs-with-feedback-hub
wow this really sucks. I’m just using windows 11, after about a decade of not using it. It crashes constantly. WSL seemed to stop working after I disabled the terminal from starting automatically at startup. It kept automatically starting whenever I would start the machine.
I tried the above “repair” suggestion by [anubhavashok] above … this didn’t work.
Is completely uninstalling Linux then reinstalling the only answer? For the people who backed up their current install, were they able to later restore it?
I feel like I’m spending a lot of time on windows just managing the software to keep it from crashing all the time.
If this occurs again, please capture logs! I’ll close for now.
https://github.com/Microsoft/WSL/blob/master/CONTRIBUTING.md#8-collect-wsl-logs