Resolve error "Class not registered WSL/0x80040154" without data loss?

2k views Asked by At

Everything was working just a day before but today my windows subsystem for linux is unable to open. When run by itself or in safe mode, it will open for just a second and then crash. Using the cmd or powershell, also unable to open as a root user and results in the

Class not registered Error code: Wsl/0x80040154

I tried a lot of things including restarts, wsl --update and sfc /scannow.

sfc did find corrupt files and repaired but not sure if that was directly related to the wsl, and it is still unable to open.

Other solutions I'm finding online basically say to delete everything and reinstall but that also would move all the data.

Is there any way to do this without loosing data?

2

There are 2 answers

0
Isham7920 On

For anyone else facing this error in future:

I finally was able to solve this with wsl --update --pre-release

so even though wsl --update wasn't working the pre-release had a version that did.

0
divyang4481 On

This is a bug in latest window update for linux subsystem. Hence to overcomes this issue, you can directly go to below URL and download WSL 2.0.15 version (which has fixed this issue )

https://github.com/microsoft/WSL/releases/tag/2.0.15

or you can wait for window to put this latest 2.0.15 version issue in window update.