Whenever I try to install any Linux distro on WSL I get this error:
This is my setup:
The Ubuntu distro is not listed in the installed distro:
[wsl –list –allSottosistema Windows per Linux non ha distribuzioni installate.
Usare ‘wsl.exe –list –online’ per elencare le distribuzioni disponibili e ‘wsl.exe –install ‘ per l’installazione.
È anche possibile installare le distribuzioni visitando il Microsoft Store: https://aka.ms/wslstore
Error code: Wsl/WSL_E_DEFAULT_DISTRO_NOT_FOUND3
Anyway if I try to install Ubuntu I get this message:
An then I get this message:
and here it stops.
Hyper-V is installed without adding any virtual machine or virtual switch in the control panel.
enter image description here
Is someone having any clue?
Thank you for any help.
2
Answers
Solved!
I needed to uninstall WSL, Hyper-V and the Hypervisor platform from Windows Programs & Features, reboot, reinstall everything and then apply the updates from Windows Update.
TLDR:
Ensure that you don’t have
.wslconfig
and.wslgconfig
already stored atC:/Users/{username}
when you start WSL for the first time.More Detail:
I had
.wslconfig
and.wslgconfig
already stored atC:/Users/{username}
because I re-installed Windows with "Keep files only" setting. So the files were kept at the same location after the installation. Seems like the initial WSL startup was affected by those configs. As soon as I removed them, distro installation was successful without any reboot required..wslconfig
(at the time of installing WSL):