You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Install any distribution using wsl --install or from Microsoft Store
Expected Behavior
The Linux distribution can be installed.
Actual Behavior
Received error message
WslRegisterDistribution failed with error: 0x80040154
Error: 0x80040154 Class not registered
Diagnostic Logs
In Windows Features, "Hyper-V", "Virtual Machine Platform", and "Windows Subsystem for Linux" are all turned on.
-- Tried to turn them off and back on, but didn't work either
Tried to install several distributions, e.g. Ubuntu, Debian, but none worked
After setting the default WSL version to WSL1, I was able to install Ubuntu, but when I tried to switch to WSL2 afterword using wsl --set-version Ubuntu 2, I received the same error.
Issue seemed to have been resolved for me. Some update:
I installed a second Win 11 system in a disk partition, and had no problem getting WSL2 working. But I decided to take this as the final resort and see if I can fix things in my original Win 11 system to avoid the hassle of reinstalling all the software, etc. What I can rule out from this is hardware problems such as motherboard virtualization issue.
There didn't seem to be many people having this issue for WSL2, so I googled "Class not registered" came across this site and tried the first command mentioned in it to re-register dll files in the system: FOR /R C:\ %G IN (*.dll) DO "%systemroot%\system32\regsvr32.exe" /s "%G" regsvr32 ExplorerFrame.dll
It ran for quite a while, and many error messages popped up, but it finished in the end. Afterward, I restarted the system and finally successfully installed Ubuntu with wsl --install.
Please take this solution with a grain of salt since that command tries to re-register a lot of dll files aimlessly and may bring some error messages along the way. It would be better to figure out which specific .dll files were screwed and then fix it.
Windows Version
Microsoft Windows [Version 10.0.22621.1555]
WSL Version
0.0.0.0
Are you using WSL 1 or WSL 2?
Kernel Version
5.15.90.1
Distro Version
No response
Other Software
No response
Repro Steps
Install any distribution using
wsl --install
or from Microsoft StoreExpected Behavior
The Linux distribution can be installed.
Actual Behavior
Received error message
Diagnostic Logs
-- Tried to turn them off and back on, but didn't work either
wsl --set-version Ubuntu 2
, I received the same error.WSL Logs WslLogs-2023-04-24_11-52-47.zip
The text was updated successfully, but these errors were encountered: