WSL: Catastophic failure when I try to install WSL2

Version

Microsoft Windows [Version 10.0.19045.2364]

WSL Version

  • WSL 2
  • WSL 1

Kernel Version

No response

Distro Version

Ubuntu 22.04

Other Software

No response

Repro Steps

I’m logged in to Windows with my work email that doesn’t have Admin rights, but I have a local admin account which I can run admin tasks with. If I run PowerShell as as Administrator and run

wsl --install

Expected Behavior

It should install WSL2

Actual Behavior

It gives the output:

PS C:\Windows\system32> wsl --install
Installing: Windows Subsystem for Linux
Catastrophic failure

If I install Ubuntu from the Store, it will install Ubuntu with a WSL1 kernel, although

wsl -l -v

doesn’t recognise that any distros are installed.

I have tried every combination I can think of uninstalling and reinstalling various components, I can’t seem to get WSL2 to work,

Diagnostic Logs

WslLogs-2023-01-01_23-12-01.zip

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 9
  • Comments: 37

Most upvoted comments

Tested on Windows 10 Pro.

@thehairy, ok, now try this:

  1. In a Command Prompt (%windir%\system32\cmd.exe) running as admin, run:
    netsh winsock reset
    
  2. Reboot the computer.
  3. Then, in a Command Prompt (%windir%\system32\cmd.exe) not running as admin, run the following. It will have some pop-up windows requiring your admin username and password during the install, but the Cmd Prompt should not be in admin mode:
    # Update your WSL system
    wsl --update
    
    # Install the latest version of Ubuntu
    wsl --install
    

This is the shorter and clearer version of what’s already in my comment you quoted.

Does this work for you?

I realised the issue with me was a permission issue. It was because I was running PowerShell as a different user. I had to make my current logged in user an Admin and run it with that user. This solved the problem for me

Tested on Windows 10 Pro.

Update…clearer instructions in my new comment here:
actually…you must run netsh winsock reset first, as admin, as @sebastianangermund says. Only then do my instructions below apply.


I’m logged in to Windows with my work email [a domain user account] that doesn’t have Admin rights, but I have a local admin account which I can run admin tasks with.

Same here. The solution for me was to not run the cmd prompt as an admin. Then, when I run the following commands, a window will pop up at some point which asks for my admin username and password. At that point, I use my local admin account, and it works just fine.

Again, do not run cmd prompt as an admin. Run it as a normal user:

# Update your WSL system
wsl --update

# Install the latest version of Ubuntu
wsl --install

If you get the Catastrophic failure error, you probably mistakenly ran the command prompt or power shell as a local admin.

Thanks to this comment, I resolved the problem. (https://stackoverflow.com/a/78004733) I summarized a detailed procedure for this solution.

Steps:

  1. Download WSL package released by Microsoft (https://github.com/microsoft/WSL/releases)
  2. Open Command Prompt as Administrator
  3. Go to the download directory of the package cd Downloads
  4. Run command msiexec /package wsl.2.2.2.0.x64.msi
  5. Check if it is installed wsl --version

This approach does not require wsl --install command, so it avoids Catastrophic failure

This

Tested on Windows 10 Pro.

@thehairy, ok, now try this:

  1. In a Command Prompt (%windir%\system32\cmd.exe) running as admin, run:
    netsh winsock reset
    
  2. Reboot the computer.
  3. Then, in a Command Prompt (%windir%\system32\cmd.exe) not running as admin, run the following. It will have some pop-up windows requiring your admin username and password during the install, but the Cmd Prompt should not be in admin mode:
    # Update your WSL system
    wsl --update
    
    # Install the latest version of Ubuntu
    wsl --install
    

This is the shorter and clearer version of what’s already in my comment you quoted.

Does this work for you?

This solution worked for me. Followed the step exactly!! thank you very much

I realised the issue with me was a permission issue. It was because I was running PowerShell as a different user. I had to make my current logged in user an Admin and run it with that user. This solved the problem for me

I’m facing this same issue using an organization’s PC where I can’t be made an admin. Is there any workaround for this?

@paiam-de this thread helped me https://github.com/microsoft/WSL/issues/8662, especially running netsh winsock reset and rebooting. hope it helps you too

I realised the issue with me was a permission issue. It was because I was running PowerShell as a different user. I had to make my current logged in user an Admin and run it with that user. This solved the problem for me

This worked for me as well - I would get this error on my non-admin user account even when running PowerShell as administrator.

Fix: logged into the administrator account for my personal machine directly and was able to successfully wsl --update as well as successfully install distributions that I couldn’t before (got error 0x8000ffff).

I had the same problem, I managed to solve it this way. wsl --update --web-download wsl --install

Guess what? I just managed to install Ubuntu through WSL in the VS Code. I just did connect WSL then the VS code starts to install Ubuntu. I don’t know what magic happed. Now when I do “wsl --update” in the powershell or cmd, I get a pop-up window requiring my local admin. Yet, my VS Code showed it was running WSL 1 instead of WSL 2. Then I upgraded from WSL 1 to WSL 2, it proceeded smoothly.

Glad to hear you got it working! I had to run the command ‘wsl --set-default-version 2’ and this fixed my issue on another computer when launching. Maybe it will help you… ? There was a bit of magic to it on my end as well 😁

Tested on Windows 10 Pro.

@thehairy, ok, now try this:

  1. In a Command Prompt (%windir%\system32\cmd.exe) running as admin, run:
    netsh winsock reset
    
  2. Reboot the computer.
  3. Then, in a Command Prompt (%windir%\system32\cmd.exe) not running as admin, run the following. It will have some pop-up windows requiring your admin username and password during the install, but the Cmd Prompt should not be in admin mode:
    # Update your WSL system
    wsl --update
    
    # Install the latest version of Ubuntu
    wsl --install
    

This is the shorter and clearer version of what’s already in my comment you quoted.

Does this work for you?

This has worked, thanks.

Tested on Windows 10 Pro.

@thehairy, ok, now try this:

  1. In a Command Prompt (%windir%\system32\cmd.exe) running as admin, run:
    netsh winsock reset
    
  2. Reboot the computer.
  3. Then, in a Command Prompt (%windir%\system32\cmd.exe) not running as admin, run the following. It will have some pop-up windows requiring your admin username and password during the install, but the Cmd Prompt should not be in admin mode:
    # Update your WSL system
    wsl --update
    
    # Install the latest version of Ubuntu
    wsl --install
    

This is the shorter and clearer version of what’s already in my comment you quoted.

Does this work for you?

This worked for me, thanks a lot was stuck on this for a whole day

I just encountered this as well, the problem for me was no network connection (obviously you need a connection to install updates 🤦‍♂️)

I realised the issue with me was a permission issue. It was because I was running PowerShell as a different user. I had to make my current logged in user an Admin and run it with that user. This solved the problem for me

Thank you so much. I started a windows powershell with my normal user, not my admin user and it works

This shit is broken as hell.

If you get the Catastrophic failure error, you probably mistakenly ran the command prompt or power shell as a local admin.

Thats unfortnuately not the case. Ran it as a normal user and after running the installation it asked for admin credentials -> Critical failure

Install the laterst version from

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

This solves all your problems!

sharing my experience current windows build 10.0.26100 N/A Build 26100

running netsh winsock reset didn’t help

what I did was enabled the local Administrator account and login as Administrator then execute

wsl --install and it work

Tested on Windows 10 Pro. @thehairy, ok, now try this:

  1. In a Command Prompt (%windir%\system32\cmd.exe) running as admin, run:
    netsh winsock reset
    
  2. Reboot the computer.
  3. Then, in a Command Prompt (%windir%\system32\cmd.exe) not running as admin, run the following. It will have some pop-up windows requiring your admin username and password during the install, but the Cmd Prompt should not be in admin mode:
    # Update your WSL system
    wsl --update
    
    # Install the latest version of Ubuntu
    wsl --install
    

This is the shorter and clearer version of what’s already in my comment you quoted. Does this work for you?

This worked for me, thanks a lot was stuck on this for a whole day

Thanks for your instruction. But I didn’t get a pop-up windows requiring my local admin username and password during step 3 and still have the “Catastophic failure”. Any ideas?

Is it possible you are already a local admin 🤔?

Tested on Windows 10 Pro.

@thehairy, ok, now try this:

  1. In a Command Prompt (%windir%\system32\cmd.exe) running as admin, run:
    netsh winsock reset
    
  2. Reboot the computer.
  3. Then, in a Command Prompt (%windir%\system32\cmd.exe) not running as admin, run the following. It will have some pop-up windows requiring your admin username and password during the install, but the Cmd Prompt should not be in admin mode:
    # Update your WSL system
    wsl --update
    
    # Install the latest version of Ubuntu
    wsl --install
    

This is the shorter and clearer version of what’s already in my comment you quoted.

Does this work for you?

Worked for me perfectly! Thank you! You would think in a world where privileged access is becoming more controlled you would start out of the gate with admin privileges … weird.

Anyhoo, you saved me on this one 😃

I ran into catastrophic failure error and solved as per https://stackoverflow.com/a/78004733/598353

I did the same thing got catastrophic thing but then in an administrative shell, unregistered ubuntu first with wsl --unregister ubuntu and then installed it again with wsl --install. Now it worked perfectly.