Open cmmata opened 2 years ago
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\LocalState
At 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.
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
I have same problem when I run wsl in cmd with "Class not registered" error:
cmd version: Microsoft Windows [Version 10.0.22000.708] (c) Microsoft Corporation. All rights reserved.
To 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.
To 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 got the same error today after updating WSL. This fixed it for me too. Thanks a lot.
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 ended up here; the Repair didn't work but I happened to notice https://learn.microsoft.com/en-us/windows/wsl/troubleshooting#error-0x80040154-after-windows-update so I'm going to try that after backing up my ext4.vhdx
file from %UserProfile%\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState
Edit resetting/uninstalling didn't do anything bad to my data, possibly because I had "upgraded" a WSL 2 instance from previous to the store version after upgrading to Windows 11 so my data was already detached from the Store install?
Resetting didn't work but uninstall/reinstall did.
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.
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.
I had this happen today after reinstalling WSL 1.2.5 and https://github.com/microsoft/WSL/issues/8268#issuecomment-1181802550 fixed it
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
wsl --update --pre-release
saved my live today having same troubles.
To 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 ended up having to uninstall Windows Subsystem for Linux from here, disable the windows feature (start menu > Turn windows features on or off), reboot, then re-enable it
DO NOT update to latest wsl version (as of 20.12.23) (in my case this happens after a fresh install of windows)
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows
PS C:\Users\lousk> wsl
╭─ /mnt/c/Users/lousk ··············································································· ✔ 22:11:02 ─╮
╰─ exit ─╯
PS C:\Users\lousk> wsl.exe --update
Installing: Windows Subsystem for Linux
Windows Subsystem for Linux has been installed.
PS C:\Users\lousk> wsl --shutdown
Class not registered
Error code: Wsl/CallMsi/REGDB_E_CLASSNOTREG
PS C:\Users\lousk> wsl --shutdown
you can see wsl works but after updating stop working.
if so, do as @aquino-mael suggested:
To 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.
managed to solve it:
wsl --update
Hello, @Eliav2. Can you please give a detailed steps how to do that?
@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
how do you uninstall wsl and reinstall it manually. wsl --uninstall is giving the same error
@pj185095 I don't know if this applies to your issue with the error message, but here's how I update WSL 2 from an Administrator Powershell after first installing WSL 2 with "wsl --install" from a CMD prompt.
PS > Get-AppxPackage -allusers | findstr /i "Linux"
PackageFullName : MicrosoftCorporationII.WindowsSubsystemForLinux_2.0.4.0_x64__8wekyb3d8bbwe
PS > Remove-AppxPackage -package MicrosoftCorporationII.WindowsSubsystemForLinux_2.0.4.0_x64__8wekyb3d8bbwe -allusers
PS > dism.exe /online /Add-ProvisionedAppxPackage /packagepath:Microsoft.WSL_2.0.15.0_x64_ARM64.msixbundle /skiplicense
Restart Windows
In my case, this step by step didn't work and I had to uninstall WSL and Ubuntu.
@josewalter I fixed my earlier comment about updating WSL 2 from Administrator Powershell.
@Eliav2 Thanks ! It only has to be installed manually and it is fixed seriously, thank you
Spent a whole day trying to fix this issue until I found this answer. Thanks! @Eliav2
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/
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/
This worked like a charm
DO NOT update to latest wsl version (as of 20.12.23) (in my case this happens after a fresh install of windows)
@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.
hi, just remove wsl fully on your machine then download it via here: https://objects.githubusercontent.com/github-production-release-asset-2e65be/55626935/ad5a76b7-b2f2-49e7-9b6d-c9d16b171156?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=releaseassetproduction%2F20241107%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20241107T103928Z&X-Amz-Expires=300&X-Amz-Signature=f3128bdb31a5094eeb387b56b5981f53adcf5fb4b4e423bba8e32e638284062c&X-Amz-SignedHeaders=host&response-content-disposition=attachment%3B%20filename%3Dwsl.2.3.24.0.x64.msi&response-content-type=application%2Foctet-stream
then voila it works
Version
Microsoft Windows [Version 10.0.22581.200]
WSL Version
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 PowerShellExpected 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
If I execute
wsl --status
from PowerShell, I only seeDiagnostic Logs
No response