Error code: Wsl/InstallDistro/E_UNEXPECTED - Catastrophic failure - Windows Subsystem for Linux

Ronsha45623 0 Reputation points
2023-06-20T07:17:29.07+00:00

I am facing an issue with installation of Ubuntu 20.04 in my wsl. I have earlier installed WSL without any issues on my PC and was running fine with ROS1 and ROS2. But when i tried to uninstall a python verison, it show how corrupted the ubuntu. so i unregistered the older version. And now trying to install new one. But i doubt that the old files are still in my system as I can see the older version of ubuntu in my program and I am not an admin of the PC. But i have admin rights.

What I did was as follows:

wsl --update --web-download

I used --web-download as without arguments was not working.

Then i tried to run the following command:

wsl.exe --install Ubuntu-20.04

and got the error as : >>

Installing: Ubuntu 20.04 LTS
Ubuntu 20.04 LTS has been installed.
Catastrophic failure
Error code: Wsl/InstallDistro/E_UNEXPECTED


What may be reason and how can I install Ubuntu 20.04 ?

I havre already turn on:

windows subsystem for linux
virtual environment



Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
11,077 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Limitless Technology 44,091 Reputation points
    2023-06-21T12:26:49.12+00:00

    Hello Ronsha45623,

    Thank you for your question and for reaching out with your question today.

    The error message you received during the installation of Ubuntu 20.04 in WSL indicates a serious failure with the error code Wsl/InstallDistro/E_UNEXPECTED. This error can occur due to various reasons, including issues with the previous installation or conflicts with existing files.

    To troubleshoot and resolve this issue, you can try the following steps:

    1. Unregister the existing Ubuntu installation:
      • Open Command Prompt or PowerShell as an administrator.
      • Run the command wsl.exe --unregister Ubuntu-20.04 to unregister the existing Ubuntu installation.
    2. Clean up remnants of the previous installation:
      • Open the "Programs and Features" or "Apps & features" settings on your Windows system.
      • Look for any entries related to the older version of Ubuntu and uninstall them if they exist.
    3. Reset WSL components:
      • Open PowerShell as an administrator.
      • Run the command wsl --shutdown to shut down all running WSL instances.
      • Run the command netsh winsock reset to reset the Winsock catalog.
      • Run the command netsh int ip reset to reset the TCP/IP stack.
      • Restart your computer.
    4. Install Ubuntu 20.04 again:
      • Open PowerShell or Command Prompt as an administrator.
      • Run the command wsl.exe --install -d Ubuntu-20.04 to install Ubuntu 20.04 using the default package from the Microsoft Store.
      • If the above command doesn't work, you can try using the manual installation method:
        • Download the Ubuntu 20.04 distribution package manually from the Microsoft website.
        • Open PowerShell or Command Prompt as an administrator.
        • Navigate to the directory where the downloaded package is located.
        • Run the command wsl.exe --import Ubuntu-20.04 <directory_path> <filename>.tar to import the Ubuntu 20.04 distribution manually.

    After following these steps, you should be able to install Ubuntu 20.04 in WSL successfully. If the issue persists, you may want to consider performing a clean installation of WSL or reaching out to your system administrator for further assistance, as they may have specific configurations or restrictions in place.

    I used AI provided by ChatGPT to formulate part of this response. I have verified that the information is accurate before sharing it with you.

    If the reply was helpful, please don’t forget to upvote or accept as answer.

    4 people found this answer helpful.

  2. Maurice Lenz 0 Reputation points
    2024-06-23T16:23:30.38+00:00

    A possible cause for this error is Hyper-V not setup correctly, for me the following actions solved the problem:

    1. Go to Control Panel-> Programs and Features -> Turn windows features on or off
    2. Uninstall Hyper-V & Windows-Subsystem for Linux
    3. Verify Hardware Compatibility by running systeminfo as outlined in the following link: https://learn.microsoft.com/en-us/virtualization/hyper-v-on-windows/reference/hyper-v-requirements
    4. Reboot machine, press F2/DEL, setup virtualization in BIOS. Usually it is under "Advanced\CPU Configuration\SVM Mode" or similar
    5. Run systeminfo and it must show "Hyper-V Requirements: A hypervisor has been detected. Features required for Hyper-V will not be displayed." at the end
    6. Install Hyper-V & Windows-Subsystem for Linux
    7. Run wsl --install ubuntu and the error should not appear anymore
    0 comments No comments