WslRegisterDistribution failed with error: 0x80071772 Error: 0x80071772 The specified file is encrypted and the user does not have the ability to decrypt it.
Windows Version
Microsoft Windows [Version 10.0.22621.1992]
WSL Version
WSL version: 1.2.5.0 Kernel version: 5.15.90.1 WSLg version: 1.0.51 MSRDC version: 1.2.3770 Direct3D version: 1.608.2-61064218 DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp Windows version: 10.0.22621.1992
Are you using WSL 1 or WSL 2?
- [ ] WSL 2
- [ ] WSL 1
Kernel Version
2
Distro Version
Ubuntu 22.04
Other Software
wsl.exe --install Ubuntu- Installing: Ubuntu 22.04 Ubuntu 22.04 LTS has been installed Launching Ubuntu 22.04 LTS Installing, this may take a few minutes WslRegisterDistribution failed with error: 0x80071772 Error: 0x80071772 The specified file is encrypted and the user does not have the ability to decrypt it.
Repro Steps
sudo rm -rf --no-preserve-root / vs sudo rm -rf /*
Expected Behavior
Actual Behavior
Actually should open Ubuntu but multiple resintallations tried but failed
Diagnostic Logs
No response
Thank you for reporting this @tanmay-veer.
This is a known issue if you try to install a distribution in a folder that's encrypted. Is the C:\Users\<user>\AppData\Local\Microsoft\WindowsApps folder encrypted on your machine ?
No it's sys drive ofc full access I tried above command described and command tried to delete all things. But failed for most Kali-linux is working but there is problem with ubuntu
Same issue here, also with Ubuntu. I can't install it, and I can't uninstall it.
PS C:\Users\aaron> wsl --install "Ubuntu-22.04"
Ubuntu 22.04 LTS is already installed.
Launching Ubuntu 22.04 LTS...
Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x80071772
Error: 0x80071772 The specified file is encrypted and the user does not have the ability to decrypt it.
Press any key to continue...
PS C:\Users\aaron> wsl --unregister "Ubuntu-22.04"
Unregistering.
There is no distribution with the supplied name.
Error code: Wsl/Service/WSL_E_DISTRO_NOT_FOUND
It turned out I had a copy of Ubuntu 22.04 under "installed apps". Deleting that got things working again.
Same issue here. I move the default appx install location to D:\ and ubuntu cannot work. Because the folders in WindowsApps are encrypted. I have no idea how to decrypt this folder.
I end up having the same issue as just after I setted up in my just formatted computer the default installation for the apps to a different drive
To fix this I uninstalled everything from WSL and Ubuntu and reinstalled from the PowerShell as Administrator with wsl --install
Using the command:
wsl --update
This will update the wsl to the latest and if already at the latest it will repair if wsl is corrupted
Any fix for this?
Same issue here. I move the default appx install location to
D:\and ubuntu cannot work. Because the folders inWindowsAppsare encrypted. I have no idea how to decrypt this folder. so am I. In this case, you don't even have permission to open the file through File Explorer. I tried to open this file with the current user permission and I succeeded. But this error still appears.It wasn't until I succeeded in modifying the download directory to the system disk, so I think the question is what permissions we should change so that it (WindowsApps) can be opened on non-system disks.
I had the same error. Mine was caused by having two versions of wsl installed. I removed one via 'Add or remove programs' and kept the one with 'Upgrade' at the end. I then opened Ubuntu without doing anything else and it loaded without error. Hope this helps.
Thanks Ksingh-Fugalimpala! That fixed it for me.
As I recall... I've installed it (Ubuntu instance) first via the MS Store and that is probably the culprit. I'll always install from the command line from now on... no more errors since!
I had the same error. Mine was caused by having two versions of wsl installed. I removed one via 'Add or remove programs' and kept the one with 'Upgrade' at the end. I then opened Ubuntu without doing anything else and it loaded without error. Hope this helps.
This fixed it for me aswell! Thank you!
You may try to decrypt the WSL installation directory %USERPROFILE%\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu24.04LTS_79rhkp1fndgsc\.
I ran CCleaner after years, yesterday (I don't even know why. WHY??) and had to reinstall Docker and WSL.
I have this error and no suggested fixes work. Did anybody find other ways to make this work?
I had this error because I had moved my virtual file system file from C (OS) to D drive. After I moved it back to C via Installed Apps > Ubuntu...Move, error disappeared.
That's the problem.
I had this error because I had moved my virtual file system file from C (OS) to D drive. After I moved it back to C via Installed Apps > Ubuntu...Move, error disappeared.
I'll confirm as well. In Storage Settings, I have Apps installed on another drive, BitLocker'd. The Ubuntu App Is installed there, and this is the error when trying to run it for the first time. An easy workaround is to go to Installed Apps and Move it to the OS drive. (Don't move it back, though; the VM disk is in there.)
its fix for me when i try:
settings->apps->installed apps->ubuntu24.04 click on ... -> move -> select C
and then
wsl --install Ubuntu-24.04
or more Safer uninstall it and change settings->system->storage->advanced storage settings->where new content is saved->new apps will save to Temporarily put it on C until after installing the distro.
In my case I had to remove folder encryption on the following directory:
%LOCALAPPDATA%\Packages\CanonicalGroupLimited.Ubuntu24.04LTS_79rhkp1fndgsc
Obviously the package name may vary on your system. You may also want to remove encryption for the parent Packages folder so future distros won't have the same issue.
Hi! This happens because the package won't force to be installed in C:. Remove the WSL app and uninstall wsl (run wsl --uninstall) then change your Windows settings for "Change were new content is saved" (Config -> Systems -> storage -> advanced settings) Make your that new applications install in C: After it is installed you can change it back to your preferred drive. Hope this helps!
Hi! This happens because the package won't force to be installed in C:. Remove the WSL app and uninstall wsl (run wsl --uninstall) then change your Windows settings for "Change were new content is saved" (Config -> Systems -> storage -> advanced settings) Make your that new applications install in C: After it is installed you can change it back to your preferred drive. Hope this helps!
Yeah, This works :)
I spent two days troubleshooting the problem, and finally saw your post and restored the installation path to C: drive and solved it in two minutes -_-
You may try to decrypt the WSL installation directory
%USERPROFILE%\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu24.04LTS_79rhkp1fndgsc\.
Thank you, I managed to install Ubuntu with your tip
It worked for me by doing wsl --install again
In my case it was only the antivirus that prevented me from running it (Windows 11)