How do i fix the error "WslRegisterDistribution failed with error: 0x80004005" which comes when I try to install kali linux?

Om Malhotra 5 Reputation points
2023-09-06T08:27:15.4+00:00

I downlaoded kali linux using the command in cmd

wsl -install -d kali-linux

Now whenever I try to open the app the error "WslRegisterDistribution failed with error: 0x80004005" shows up. I tried running cmd as administrator and then typed

kali

Still it shows the same error.

I have already enabled Virtual Machine Platform and Windows subsystem for linux. Changing the version of wsl too has no effect.

Any help would be appreciated!

Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
6,003 questions
0 comments No comments
{count} vote

6 answers

Sort by: Most helpful
  1. Vanilou 10 Reputation points
    2023-09-20T17:59:14.24+00:00

    I fix the error by installing a previous version of kali given on the page https://learn.microsoft.com/en-us/windows/wsl/install-manual#step-4---download-the-linux-kernel-update-package

    At the end of the page you have the section troublesshouting and Downloading distributions. I downloaded the given version of kali double click on the file, and confirmed that I wanted to reinstall an older version than the one I just installed that give the error.

    launching the previous version works! you can update kali in kali with:
    sudo apt update && sudo apt upgrade -y

    2 people found this answer helpful.
    0 comments No comments

  2. win shaine 5 Reputation points
    2023-09-07T15:21:06.9766667+00:00

    You can try to update WSL first, and after that, rerun the installation.

    1 person found this answer helpful.

  3. Limitless Technology 41,906 Reputation points
    2023-09-06T12:27:00.7733333+00:00

    Hello

    Thank you for your question and reaching out.

    Go to the following registry key: ( Please take back up before any changes)

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LxssManager

    On the right pane, locate Start and set the Value Data to 2.

    Exit REGEDIT, and reboot the machine to see if it works.

    --If the reply is helpful, please Upvote and Accept as answer--


  4. Λ H S Ξ N 0 Reputation points
    2023-09-15T18:06:07.7133333+00:00

    Same issue here. Tried both solutions and all things OP mentioned, restarted afterwards, and nothing worked. On top of that, wsl --install -d kali-linux reports that it has already been installed, and launches it. However, wsl --list --all claims that Windows Subsystem for Linux has no installed distributions. 😒


  5. Tim 116 Reputation points
    2023-09-20T14:16:55.2233333+00:00

    Having the same issue. It seems like Appx packages ruin everything. The errors are ambiguous, the troubleshooting difficult, and installations break at seemingly random times. Why can't we just go back to having MSIs which were much more reliable?

    0 comments No comments