Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot install distributions for WSL2 (Error 0x80040154) #10019

Closed
1 of 2 tasks
dzdhr opened this issue Apr 24, 2023 · 2 comments
Closed
1 of 2 tasks

Cannot install distributions for WSL2 (Error 0x80040154) #10019

dzdhr opened this issue Apr 24, 2023 · 2 comments
Assignees

Comments

@dzdhr
Copy link

dzdhr commented Apr 24, 2023

Windows Version

Microsoft Windows [Version 10.0.22621.1555]

WSL Version

0.0.0.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

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 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.

WSL Logs WslLogs-2023-04-24_11-52-47.zip

@benhillis
Copy link
Member

Thanks for reporting, I'm following up with the team that owns this codepath.

@benhillis benhillis self-assigned this Apr 24, 2023
@dzdhr
Copy link
Author

dzdhr commented May 5, 2023

Issue seemed to have been resolved for me. Some update:

  1. 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.
  2. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants