microsoft / WSL

Issues found on WSL
https://docs.microsoft.com/windows/wsl
MIT License
17.27k stars 813 forks source link

Error 0x80004005 when trying to register Kali Linux #10424

Closed ebrocoli closed 1 year ago

ebrocoli commented 1 year ago

Windows Version

Version 10.0.22000.2295

WSL Version

0.0.0.0

Are you using WSL 1 or WSL 2?

Kernel Version

5.10.16

Distro Version

Kali Linux

Other Software

No response

Repro Steps

I was enabling WSL with the steps that Microsoft already listed Then i tried to install Kali Linux, which the installation is succesfull But when i typed kali it started to show Installing, this may take a few minutes... And then the error happened, but this only happens with Kali and not other distros I tried Ubuntu and Debian which worked fine so far

Expected Behavior

Installing, this may take a few minutes... Please create a default UNIX user account. The username does not need to match your Windows username. For more information visit: https://aka.ms/wslusers Enter new UNIX username:

Actual Behavior

Installing, this may take a few minutes... WslRegisterDistribution failed with error: 0x80004005 Error: 0x80004005 Unspecified error

Diagnostic Logs

No response

TuanDung0902 commented 1 year ago

I have same problem with Kali Linux, but I found a solution is installing WSL from Microsoft Store.

Lopez017 commented 1 year ago

can you post a link to which WSL you used from the Microsoft store?

TuanDung0902 commented 1 year ago

can you post a link to which WSL you used from the Microsoft store?

Here is the link: https://apps.microsoft.com/store/detail/windows-subsystem-for-linux/9P9TQF7MRM4R

Gabistakk commented 1 year ago

im also having this issue, with kali linux. tried all the fixes online but none works.

TuanDung0902 commented 1 year ago

im also having this issue, with kali linux. tried all the fixes online but none works.

Have you try to install WSL from MS Store?

Gabistakk commented 1 year ago

yeah it worked thank you so much! for others what i did was (after installing WSL from MS store): in the windows power shell: "wsl.exe --list --online" it returns a list of the distros avaible. then 'wsl.exe --install (distro name)'

TuanDung0902 commented 1 year ago

yeah it worked thank you so much! for others what i did was (after installing WSL from MS store): in the windows power shell: "wsl.exe --list --online" it returns a list of the distros avaible. then 'wsl.exe --install (distro name)'

No problem I glad to help you!

nateesh commented 1 year ago

for me wsl --update and also setting LxssManager to automatic (via services or regedit) worked.

id-widi commented 1 year ago

yeah it worked thank you so much! for others what i did was (after installing WSL from MS store): in the windows power shell: "wsl.exe --list --online" it returns a list of the distros avaible. then 'wsl.exe --install (distro name)'

i tried to install kali linux as you methode but don't work with me.

wsl --install -d kali-linux

but after few second show same problem, error "WslRegisterDistribution failed with error: 0x80004005"

what i do for solving this problem is editing registry lxssManager to value 2, manual install with powershell, and direct install from microsoft store.

oh btw i use windows 11.

ihynar commented 1 year ago

yeah it worked thank you so much! for others what i did was (after installing WSL from MS store): in the windows power shell: "wsl.exe --list --online" it returns a list of the distros avaible. then 'wsl.exe --install (distro name)'

i tried to install kali linux as you methode but don't work with me.

wsl --install -d kali-linux

but after few second show same problem, error "WslRegisterDistribution failed with error: 0x80004005"

what i do for solving this problem is editing registry lxssManager to value 2, manual install with powershell, and direct install from microsoft store.

oh btw i use windows 11.

first use wsl.exe --update

Junior-Programming commented 11 months ago

wsl --update Installing: Windows Subsystem for Linux Windows Subsystem for Linux has been installed.

wsl --install -d kali-linux Installing: Kali Linux Rolling Kali Linux Rolling has been installed. Launching Kali Linux Rolling... Installing, this may take a few minutes... WslRegisterDistribution failed with error: 0x80004005 Error: 0x80004005 Unspecified error

Press any key to continue...

i keep getting error

Duodecimy commented 11 months ago

wsl --update Installing: Windows Subsystem for Linux Windows Subsystem for Linux has been installed.

wsl --install -d kali-linux Installing: Kali Linux Rolling Kali Linux Rolling has been installed. Launching Kali Linux Rolling... Installing, this may take a few minutes... WslRegisterDistribution failed with error: 0x80004005 Error: 0x80004005 Unspecified error

Press any key to continue...

i keep getting error

Did you try to edit registry lxssManager to value 2? What I did:

  1. win + R -> regedit -> \HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LxssManager -> click the start option -> edit the value to 2
  2. run powershell in administrator mode -> wsl --update
  3. kali
  4. then it worked!
alkebe commented 11 months ago

wsl --update Installing: Windows Subsystem for Linux Windows Subsystem for Linux has been installed. wsl --install -d kali-linux Installing: Kali Linux Rolling Kali Linux Rolling has been installed. Launching Kali Linux Rolling... Installing, this may take a few minutes... WslRegisterDistribution failed with error: 0x80004005 Error: 0x80004005 Unspecified error Press any key to continue... i keep getting error

Did you try to edit registry lxssManager to value 2? What I did:

  1. win + R -> regedit -> \HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LxssManager -> click the start option -> edit the value to 2
  2. run powershell in administrator mode -> wsl --update
  3. kali
  4. then it worked!

This worked for me also. Thanks

nshettys commented 11 months ago

wsl --update Installing: Windows Subsystem for Linux Windows Subsystem for Linux has been installed. wsl --install -d kali-linux Installing: Kali Linux Rolling Kali Linux Rolling has been installed. Launching Kali Linux Rolling... Installing, this may take a few minutes... WslRegisterDistribution failed with error: 0x80004005 Error: 0x80004005 Unspecified error Press any key to continue... i keep getting error

Did you try to edit registry lxssManager to value 2? What I did:

  1. win + R -> regedit -> \HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LxssManager -> click the start option -> edit the value to 2
  2. run powershell in administrator mode -> wsl --update
  3. kali
  4. then it worked!

Thanks a ton!!! This worked for me. Thanks again

ShabbirMehdi110 commented 11 months ago

yeah it worked thank you so much! for others what i did was (after installing WSL from MS store): in the windows power shell: "wsl.exe --list --online" it returns a list of the distros avaible. then 'wsl.exe --install (distro name)'

tha

yeah it worked thank you so much! for others what i did was (after installing WSL from MS store): in the windows power shell: "wsl.exe --list --online" it returns a list of the distros avaible. then 'wsl.exe --install (distro name)'

thanks it works

veelorn commented 11 months ago

Windows Version

Version 10.0.22000.2295

WSL Version

0.0.0.0

Are you using WSL 1 or WSL 2?

  • [x] WSL 2
  • [ ] WSL 1

Kernel Version

5.10.16

Distro Version

Kali Linux

Other Software

No response

Repro Steps

I was enabling WSL with the steps that Microsoft already listed Then i tried to install Kali Linux, which the installation is succesfull But when i typed kali it started to show Installing, this may take a few minutes... And then the error happened, but this only happens with Kali and not other distros I tried Ubuntu and Debian which worked fine so far

Expected Behavior

Installing, this may take a few minutes... Please create a default UNIX user account. The username does not need to match your Windows username. For more information visit: https://aka.ms/wslusers Enter new UNIX username:

Actual Behavior

Installing, this may take a few minutes... WslRegisterDistribution failed with error: 0x80004005 Error: 0x80004005 Unspecified error

Diagnostic Logs

No response

Hi, I try "wsl --update" and then "wsl --install -d (distribution)" Its worked for me

Yaser-Ebrahimi commented 11 months ago

wsl --update Installing: Windows Subsystem for Linux Windows Subsystem for Linux has been installed. wsl --install -d kali-linux Installing: Kali Linux Rolling Kali Linux Rolling has been installed. Launching Kali Linux Rolling... Installing, this may take a few minutes... WslRegisterDistribution failed with error: 0x80004005 Error: 0x80004005 Unspecified error Press any key to continue... i keep getting error

Did you try to edit registry lxssManager to value 2? What I did:

  1. win + R -> regedit -> \HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LxssManager -> click the start option -> edit the value to 2
  2. run powershell in administrator mode -> wsl --update
  3. kali
  4. then it worked!

This worked for me also. Thanks

Yanis0alpha commented 10 months ago

pour mi toujour pas

PS C:\Windows\system32> wsl --update Installation en cours : Sous-système Windows pour Linux Sous-système Windows pour Linux a été installé. PS C:\Windows\system32> kali Installing, this may take a few minutes... WslRegisterDistribution failed with error: 0x80072746 Error: 0x80072746 Une connexion existante a d¹ Ûtre fermÚe par l?h¶te distant.

Press any key to continue... PS C:\Windows\system32>

permadistudio commented 10 months ago

semua tips yang anda berikan tidak berhasil untuk saya, entah apa yang terjadi, saya tidak tahu

Pinto-Katende-Jonathan commented 10 months ago
  1. Make sure to use Powershell (as adminstrator) instead of cmd
  2. Type these two commands :
    • dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
    • dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all
  3. Download and install the WSL 2 Linux Kernel from here: aka.ms/wsl2kernel
  4. Restart
  5. Open again Powershell
  6. Type : wsl --set-default-version 2
  7. Install KALI : wsl --install --distribution kali-linux
dhruvsharma1904 commented 9 months ago

wsl --update Installing: Windows Subsystem for Linux Windows Subsystem for Linux has been installed. wsl --install -d kali-linux Installing: Kali Linux Rolling Kali Linux Rolling has been installed. Launching Kali Linux Rolling... Installing, this may take a few minutes... WslRegisterDistribution failed with error: 0x80004005 Error: 0x80004005 Unspecified error Press any key to continue... i keep getting error

Did you try to edit registry lxssManager to value 2? What I did:

  1. win + R -> regedit -> \HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LxssManager -> click the start option -> edit the value to 2
  2. run powershell in administrator mode -> wsl --update
  3. kali
  4. then it worked!

thanks a lot dude!

isaga7 commented 8 months ago

wsl --update Installing: Windows Subsystem for Linux Windows Subsystem for Linux has been installed. wsl --install -d kali-linux Installing: Kali Linux Rolling Kali Linux Rolling has been installed. Launching Kali Linux Rolling... Installing, this may take a few minutes... WslRegisterDistribution failed with error: 0x80004005 Error: 0x80004005 Unspecified error Press any key to continue... i keep getting error

Did you try to edit registry lxssManager to value 2? What I did:

  1. win + R -> regedit -> \HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LxssManager -> click the start option -> edit the value to 2
  2. run powershell in administrator mode -> wsl --update
  3. kali
  4. then it worked!

help me it didnt work for me, still says error

Pinto-Katende-Jonathan commented 8 months ago

wsl --update Installing: Windows Subsystem for Linux Windows Subsystem for Linux has been installed. wsl --install -d kali-linux Installing: Kali Linux Rolling Kali Linux Rolling has been installed. Launching Kali Linux Rolling... Installing, this may take a few minutes... WslRegisterDistribution failed with error: 0x80004005 Error: 0x80004005 Unspecified error Press any key to continue... i keep getting error

Did you try to edit registry lxssManager to value 2? What I did:

  1. win + R -> regedit -> \HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LxssManager -> click the start option -> edit the value to 2
  2. run powershell in administrator mode -> wsl --update
  3. kali
  4. then it worked!

help me it didnt work for me, still says error

Make sure to unregistered your old kali (or uninstall it), and follow these steps : https://github.com/microsoft/WSL/issues/10424#issuecomment-1807888925

( Unregistration

wsl --unregister <DistributionName>

Replace <DistributionName> with the name of the distribution you want to unregister. For example, if you want to unregister the "Ubuntu" distribution, the command would be:

stasbalazuk commented 7 months ago

win + R -> regedit -> \HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LxssManager -> click the start option -> edit the value to 2 run powershell in administrator mode -> Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux Wait for the PC to reboot and check if it works.

wdscxsj commented 6 months ago

WSL 2.1.5.0 fails to install Kali Linux directly as WSL1 on two of my computers with WslRegisterDistribution failed with error: 0x80004005, one Windows 10 and another Windows 11.

The only workaround I can find is to first run wsl --set-default-version 2 and then install Kali Linux. (The installed version is 2024.1.) After that, it can be converted to WSL1 with wsl --set-version kali-linux 1, or exported to a different location, etc.

MuhammetSonmez commented 6 months ago

can you post a link to which WSL you used from the Microsoft store?

Here is the link: https://apps.microsoft.com/store/detail/windows-subsystem-for-linux/9P9TQF7MRM4R

I've tried every possible way to solve the problem for the past few hours, and this worked for me, thank you :)

afifafifafifafifali commented 6 months ago

this worked for me too

javidmajidov2023 commented 5 months ago

can you post a link to which WSL you used from the Microsoft store?

Here is the link: https://apps.microsoft.com/store/detail/windows-subsystem-for-linux/9P9TQF7MRM4R

THANK YOUUUUU BROOOO THANKSSSZSS TYSMMMMMMMMMMMMM

ITZalireza2008 commented 5 months ago

WslRegisterDistribution failed with error: 0x80004005 Error: 0x80004005 Unspecified error can anyone help me with this error when I run Kali in cmd?

Pinto-Katende-Jonathan commented 5 months ago

WslRegisterDistribution failed with error: 0x80004005 Error: 0x80004005 Unspecified error can anyone help me with this error when i run kali in cmd

Just remove the distribution, and reinstall it using PowerShell as administrator

bae-mars commented 5 months ago

wsl --update Installing: Windows Subsystem for Linux Windows Subsystem for Linux has been installed. wsl --install -d kali-linux Installing: Kali Linux Rolling Kali Linux Rolling has been installed. Launching Kali Linux Rolling... Installing, this may take a few minutes... WslRegisterDistribution failed with error: 0x80004005 Error: 0x80004005 Unspecified error Press any key to continue... i keep getting error

Did you try to edit registry lxssManager to value 2? What I did:

  1. win + R -> regedit -> \HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LxssManager -> click the start option -> edit the value to 2
  2. run powershell in administrator mode -> wsl --update
  3. kali
  4. then it worked!

help me it didnt work for me, still says error

dude were u able to fix it? pls help me too i am also facing same problem as u :(

d0lla646 commented 5 months ago

I have same problem with Kali Linux, but I found a solution is installing WSL from Microsoft Store.

Thx

can you post a link to which WSL you used from the Microsoft store?

Here is the link: https://apps.microsoft.com/store/detail/windows-subsystem-for-linux/9P9TQF7MRM4R

thx bld

LenTrex28 commented 5 months ago

wsl --update Installing: Windows Subsystem for Linux Windows Subsystem for Linux has been installed. wsl --install -d kali-linux Installing: Kali Linux Rolling Kali Linux Rolling has been installed. Launching Kali Linux Rolling... Installing, this may take a few minutes... WslRegisterDistribution failed with error: 0x80004005 Error: 0x80004005 Unspecified error Press any key to continue... i keep getting error

Did you try to edit registry lxssManager to value 2? What I did:

  1. win + R -> regedit -> \HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LxssManager -> click the start option -> edit the value to 2
  2. run powershell in administrator mode -> wsl --update
  3. kali
  4. then it worked!

help me it didnt work for me, still says error

Make sure to unregistered your old kali (or uninstall it), and follow these steps : #10424 (comment)

( Unregistration

wsl --unregister <DistributionName>

Replace <DistributionName> with the name of the distribution you want to unregister. For example, if you want to unregister the "Ubuntu" distribution, the command would be:

still just isnt working

bae-mars commented 5 months ago

I actually took my 2nd laptop and installed kali without any error :)

YigitOzdemir34 commented 5 months ago
  1. Make sure to use Powershell (as adminstrator) instead of cmd
  2. Type these two commands :

    • dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
    • dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all
  3. Download and install the WSL 2 Linux Kernel from here: aka.ms/wsl2kernel
  4. Restart
  5. Open again Powershell
  6. Type : wsl --set-default-version 2
  7. Install KALI : wsl --install --distribution kali-linux

Thank you. İt Works!!

nomore1007 commented 5 months ago

can you post a link to which WSL you used from the Microsoft store?

Here is the link: https://apps.microsoft.com/store/detail/windows-subsystem-for-linux/9P9TQF7MRM4R

Thank you for the link. I tried to search for it in the store, but it was not to be found. This link brought me right to it.

TheMrM commented 3 months ago

for me wsl --update and also setting LxssManager to automatic (via services or regedit) worked.

This worked for me as well.

piaono3 commented 2 months ago

can you post a link to which WSL you used from the Microsoft store?

Here is the link: https://apps.microsoft.com/store/detail/windows-subsystem-for-linux/9P9TQF7MRM4R

Thank so much bro. It worked

UsamaMo commented 2 months ago

Thank you so much everyone!

MishanGhimire commented 2 months ago

Installing, this may take a few minutes... WslRegisterDistribution failed with error: 0x80004005 Error: 0x80004005 Unspecified error

Press any key to continue...

MishanGhimire commented 2 months ago

Installing, this may take a few minutes... WslRegisterDistribution failed with error: 0x80004005 Error: 0x80004005 Unspecified error

Press any key to continue...

I used this too wsl --set-default-version 2 For information on key differences with WSL 2 please visit https://aka.ms/wsl2 The operation completed successfully. PS C:\Windows\system32> wsl --install --distribution kali-linux Kali Linux Rolling is already installed. Launching Kali Linux Rolling... PS C:\Windows\system32>

MR-LeonardoGomes commented 2 months ago

Friend you just need to install " wsl --set-default-version 2 "

https://learn.microsoft.com/pt-br/windows/wsl/install-manual#step-4---download-the-linux-kernel-update-package

MishanGhimire commented 2 months ago

Friend you just need to install " wsl --set-default-version 2 "

https://learn.microsoft.com/pt-br/windows/wsl/install-manual#step-4---download-the-linux-kernel-update-package still got error saying Installing, this may take a few minutes... WslRegisterDistribution failed with error: 0x80004005 Error: 0x80004005 Unspecified error

Press any key to continue...

MishanGhimire commented 2 months ago

Installing, this may take a few minutes... WslRegisterDistribution failed with error: 0x80004005 Error: 0x80004005 Unspecified error

Press any key to continue...

1ambd4 commented 2 months ago

can you post a link to which WSL you used from the Microsoft store?

Here is the link: https://apps.microsoft.com/store/detail/windows-subsystem-for-linux/9P9TQF7MRM4R

Works for me, thanks a lot.

MR-LeonardoGomes commented 2 months ago

bro cmd admin "wsl --set-default-version 2" Enter

MishanGhimire commented 2 months ago

bro cmd admin "wsl --set-default-version 2" Enter

not working still bro

Pinto-Katende-Jonathan commented 2 months ago

Use these commands in powershell with admin right

tienphat2101 commented 2 months ago

yeah it worked thank you so much! for others what i did was (after installing WSL from MS store): in the windows power shell: "wsl.exe --list --online" it returns a list of the distros avaible. then 'wsl.exe --install (distro name)'

Thank you, it works for me now.

l-urk commented 2 months ago