Fixing Catastrophic Failures, "Failed to translate", and 0x80071772 errors in WSL
One day I turned on my computer, logged in, and was met with a Command Prompt window asking me to update WSL. I pressed the key to start the update, and then a few seconds later saw the dreaded "Catastrophic failure" message.
The update was being driven by Docker Desktop, which I had configured to use WSL rather than Hyper-V, as is now recommended by Docker.
I tried multiple things to get WSL to work, but I wasn't able to perform any other commands with WSL as anything I tried, e.g. wsl --unregister ubuntu
would be met with the "You need to upgrade" message.
I tried various methods to uninstall WSL completely so I could do a fresh install but nothing would fix it.
Here I'll explain how I fixed the issues on my machine.
Tl;dr Version
Follow the steps in this guide to uninstall WSL
Installed WSL from the Microsoft Store here
Uninstall Ubuntu
Ensure your
New apps will save to:
setting in Windows is set to your main driveRun
wsl --install -d Ubuntu
Run
wsl --setdefault Ubuntu
Long Version
Firstly I did the following
I followed the steps in this guide to uninstall WSL
I installed WSL from the Microsoft Store here
I was then able to at least run wsl
without it asking to update, but I was then faced with another error: <3>WSL (206) ERROR: CreateProcessParseCommon:731: Failed to translate
.
After a lot of reading it turned out this error was because:
Docker Desktop had set itself as the default distro for WSL, which was what was returning those errors when I tried to run
wsl
directlyUbuntu had not been successfully installed as a distro when installing WSL through the Microsoft Store, which is the distro I wanted to use when I ran
wsl
via the command line
I found now that my Docker containers were working fine, but I couldn't use WSL to run Ubuntu.
Running wsl --list
showed the following:
Windows Subsystem for Linux Distributions:
docker-desktop-data
docker-desktop (Default)
Here we can see that Ubuntu isn't listed, and Docker is set as the default.
I noticed that Windows had attempted to install Ubuntu (it was listed in my Windows applications):
I uninstalled this and then ran wsl --install -d Ubuntu
.
I was then met with another error:
WslRegisterDistribution failed with error: 0x80071772
Error: 0x80071772 The specified file is encrypted and the user does not have the ability to decrypt it.
Now this one happened because in the past I had set my Windows apps to be installed on a different drive from C:. WSL isn't able to force Ubuntu to be installed on C, and thus gives this cryptic error.
To fix this, I went to Settings > System > Advanced storage settings > Where new content is saved
. I changed the New apps will save to:
option to be your main drive:
Once this has been done, I uninstalled Ubuntu
again via the Windows start menu, and then ran wsl --install -d Ubuntu
which ran successfully.
Lastly, I set Ubuntu as my default distro by running wsl --setdefault Ubuntu
.
Finally, I was able to use Ubuntu via WSL by running wsl
on the command line.
I hope this helps anyone else who is struggling with the same issue!