Reputation: 617
I installed wsl manually following the official documentation, I also enabled "Windows subsystem for Linux" and restarted multiple times. But when I launch ubuntu I am getting the following error. My organization doesn't support the windows store.
Any help is highly appreciated.
Upvotes: 10
Views: 10729
Reputation: 61
I suspect the source of the error stems from the folder permissions for C:\Program Files\WindowsApps\
which is set to TrustedInstaller by default. If you attempt to access this folder via File Explorer you will receive a message saying you do not have access. This is the default location for Window store apps.
An unrecommended alternative is to temporarily grant yourself access to this folder. Once you have greater permissions, you can run *.exe
(or whatever distro you're working with) from the path shown in the error message and continue with setup.
A longer, no magic, alternative is to download the distribution you need into a location you have full access to and use the MakeAppx
tool to unpack the file.
Run the following PowerShell command to download the distribution (list of distributions here). This will download an .appx
file you will need to unbundle.
Invoke-WebRequest -Uri https://aka.ms/wsl-debian-gnulinux -OutFile Debian.appx -UseBasicParsing
Add-AppxPackage
command which will register the app inside C:\Program Files\WindowsApps\
again.Locate the MakeAppx
utility to unbundle the .appx
file.
.\MakeAppx unbundle /p C:\Linux\Debian.appx /d C:\Linux\DebianOutput
View the output directory from the command above and look for the appropriate .appx
file for your processor and unpack it.
.\MakeAppx unpack /p C:Linux\DebianOutput\DistroLauncher-Appx_1.12.1.0_x64.appx /d C:\Linux\DebianOutput\x64
Run wsl -l
and you should see your distribution listed here.
Visit the output directory from step 3 and double-click your *.exe
to continue with setup.
Upvotes: 0
Reputation: 6105
I found a solution within my company, where I did run into this problem as well. This similar answer did not work for me. My company does not allow Windows Store and we only have Windows 10 version which supports only WSL 1 not WSL 2. After off-line installation of the Ubuntu appx package I ran into this error.
A workaround which worked for me is the following:
ubuntu1804.exe
file within the unzipped directoryFor me this started the installation and ultimately led me to the point where it asks to set a user name and passwort.
After this initial set-up one can subsequently start bash
by running this ubuntu1804.exe file.
As the root cause for "The service has not been started" message is still unknown to me, so this answer may or may not help others who get the same error message.
Upvotes: 16