microsoft / WSL

Issues found on WSL
https://docs.microsoft.com/windows/wsl
MIT License
17.53k stars 823 forks source link

Problem with WSL Ubuntu installation on W11 Home #12232

Open adamgas opened 3 weeks ago

adamgas commented 3 weeks ago

Windows Version

Microsoft Windows [Version 10.0.22631.4317]

WSL Version

2.3.24.0

Are you using WSL 1 or WSL 2?

Kernel Version

No response

Distro Version

Ubuntu

Other Software

No response

Repro Steps

  1. Activate Virtual Machine Platform & WSL in Windows functions
  2. Open PowerShell with "Run as administrator"
  3. Try to install Ubuntu on WSL with command: wsl --install -d Ubuntu --web-download

Expected Behavior

Installation successful, can run Ubuntu in WSL

Actual Behavior

Installation ends with error (in Polish): Pobieranie: Ubuntu Instalowanie dystrybucji: Ubuntu Dystrybucja Ubuntu została zainstalowana. Trwa uruchamianie dystrybucji Ubuntu... Grupa lub zasób nie jest w odpowiednim stanie, aby można było wykonać żądaną operację. Kod błędu: Wsl/InstallDistro/0x8007139f

Diagnostic Logs

WslLogs-2024-11-03_08-31-49.zip

github-actions[bot] commented 3 weeks ago

View similar issues

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

Diagnostic information
Detected appx version: 2.3.24.0
Detected user visible error: Wsl/InstallDistro/0x8007139f

adamgas commented 3 weeks ago

I double checked for:

Error is the same as before

OneBlue commented 3 weeks ago

Thank you @adamgas. Based on the logs it looks like the ubuntu app failed to installed. Do you see a "ubuntu" in your start menu ? If so, does starting it properly install WSL ?

adamgas commented 2 weeks ago

there is "Ubuntu" when I type it: Image But when I click it, it opens Microsoft Store: Image "Ready to download"

So, no, clicking it does not start proper install

OneBlue commented 2 weeks ago

Ok let's try to fully remove the ubuntu app then.

Can you try to run (elevated PowerShell):

 Get-AppxPackage -AllUsers  | Where { $_.PackageFamilyName.contains("Ubuntu") } | Remove-AppxPackage  -AllUsers

Beware though, this will remove all the ubuntu distributions from the machine, so if you have any data you want to keep, make backups.

Once the above command has completed, try to run wsl --install ubuntu --web-download again

adamgas commented 1 week ago

I removed Ubuntu with slightly different command:

Get-AppxPackage -AllUsers  | Where { $_.PackageFullName.contains("CanonicalGroupLimited.Ubuntu_2204.1.8.0_x64__79rhkp1fndgsc") } | Remove-AppxPackage  -AllUsers

then I restarted the computer and tried

PS C:\WINDOWS\system32> wsl --install ubuntu --web-download
Pobieranie: Ubuntu
Instalowanie dystrybucji: Ubuntu
Dystrybucja Ubuntu została zainstalowana.
Trwa uruchamianie dystrybucji Ubuntu...
Grupa lub zasób nie jest w odpowiednim stanie, aby można było wykonać żądaną operację.
Kod błędu: Wsl/InstallDistro/0x8007139f

the error is the same... so it didn't help both is powershell with administrator rights