dockerwindows-subsystem-for-linux

Docker Desktop - WSL update failed


Currently I use Docker Desktop 4.32.0 version on Windows-10, I updated to new version, after this Docker Engine Stopped Running and gave error wsl update failed: update failed: updating wsl: exit code: 4294967295: running WSL command wsl.exe C:\WINDOWS\System32\wsl.exe --update --web-download. I tried wsl --update and wsl --update --web-download but both shows Installing: Windows Subsystem for Linux The provided package is already installed, and reinstallation of the package was blocked. Check the AppXDeployment-Server event log for details. this message in windows power shell. I downloaded msi file and executed still docker engine gives same error. I got some file permission error so updated docker desktop, but wsl 2 is not getting updated. Please anyone help me.


Solution

  • No need to downgrade your Docker Desktop. There is just something wrong with the default installation of Wsl.exe.

    Option 1: A quick fix 🩹

    1. Run wsl --update OR wsl --update --web-download

    This work for many but not for me. What worked for me is option 2

    Option 2: A clean install 🏠

    1. Make sure there are no pending Windows Updates (thanks @Nik)
    2. Uninstall "Docker Desktop"
    3. Turn off "Windows Subsystem for Linux" in "Turn Windows features on or off" (I've restarted, but you may not need to)

    enter image description here

    1. Install the latest release of Wsl here https://github.com/microsoft/WSL/releases/ (or just run wsl -install)
    2. Run wsl --status to confirm installation.
    3. Install "Docker Desktop" again

    EDIT: If someone managed to fixed it without reinstalling Docker Desktop then please let me know and I can change my answer.