Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot install latest WSL version from Microsoft Store or Github repo #10640

Closed
1 of 2 tasks
jmihalich opened this issue Oct 18, 2023 · 11 comments
Closed
1 of 2 tasks

Cannot install latest WSL version from Microsoft Store or Github repo #10640

jmihalich opened this issue Oct 18, 2023 · 11 comments

Comments

@jmihalich
Copy link

jmihalich commented Oct 18, 2023

Windows Version

Microsoft Windows [Version 10.0.22621.2428]

WSL Version

does not work

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

Linux version 5.10.102.1-microsoft-standard-WSL2 (oe-user@oe-host) (x86_64-msft-linux-gcc (GCC) 9.3.0, GNU ld (GNU Binutils) 2.34.0.20200220) #1 SMP Wed Mar 2 00:30:59 UTC 2022

Distro Version

Ubuntu 22.04

Other Software

No response

Repro Steps

wsl --update

or

msiexec.exe /i c:\Users\joe\Desktop\wsl.2.0.4.0.x64.msi /L*V c:\Users\joe\Desktop\wsllogs.txt

Expected Behavior

WSL Updates to the latest version from the microsoft store (or the github repo)

Actual Behavior

Receive various errors at the end of the install or WSL is just dead altogether and gives me a message that says, WSL is currently upgrading.

It's completely unclear what the upgrade steps are if you have the original windows built in WSL/WSLG installed via the control panel/programs app.

But, let's keep this simple. I have reset the system to have WSL installed from the "turn windows featurers on or off" in the control panel, and ran windows update, and it installed the latest windows update for the built in WSL. At this point i have a functioning Ubuntu 22.04 distro working.

I downloaded the latest 2.0.4.0 distro from the github repo releases area (the msi) and ran the command:
msiexec.exe /i c:\Users\joe\Desktop\wsl.2.0.4.0.x64.msi /L*V c:\Users\joe\Desktop\wsllogs.txt

That ran and failed with the error shown below in the screen shot. The error is bogus because the service actually installed as i can see it in the Services control panel app, though it won't start (more likely the reason for the error). When I click cancel it uninstalls everything cuz it rolled back.

I've attached the wsl installer log file. I have no clue what is going on. This has to be a bug somewhere.

I am on a standalone windows 11 box at home and my user account is an administrator account.

Diagnostic Logs

wsllogs.txt

wsl-install-error
@jmihalich
Copy link
Author

furthermore, if i try to install it via the Microsoft.WSL_2.0.4.0_x64_ARM64.msixbundle installer, i get the following error.

image

@jmihalich
Copy link
Author

furthermore, if i try to run wsl --update from an elevated powershell terminal, the following occurs in the screenshot below. Note that the latest version did install cuz it shows up in settings/apps as 2.0.4.0.

image

@jmihalich
Copy link
Author

jmihalich commented Oct 18, 2023

also, after the wsl --update command, if I try to start the WSLService service in Services, i get the following error:

image

Not sure if that has anything to do with anything.

@jmihalich
Copy link
Author

Note that all of the previous update attempts were done with the system reset to the same place. That is, with the built in wsl and default windows update to the latest built in version of WSL. From there, I ran each of the install/update attempts.

I made sure that any remnants of failed installs were uninstalled/removed from the Windows 11 Settings | Apps | Installed Apps page.

@jmihalich
Copy link
Author

FYI I repeated all the above steps with 2.0.6.0, and had the exact same issues with each.

@OneBlue
Copy link
Collaborator

OneBlue commented Oct 24, 2023

Thank you @jmihalich. It looks like you might have WSL is a weird state. Can you try to install 2.0.6 via the MSI package but calling msiexec from an elevated shell, or opening it directly from the explorer ? This should solve the privilege issue.

@jmihalich
Copy link
Author

jmihalich commented Oct 25, 2023

Hi, I have already done that, and it failed. here is the screenshot. Also, see the WSLLogs.txt file attached above for the error that is occurring when running the msi file. it's the same error with 2.0.4 and 2.0.6.

image

@jmihalich
Copy link
Author

jmihalich commented Oct 25, 2023

The issue with the msi installer seems to be with attempting to uninstall/install/update the WSLService windows service.

Is there a way to uninstall WSLService and reinstall it, or let WSL Install it again if that's what actually installs the service?

When i try to manually start WSLService it fails, and says the system cannot find the specified path.

I should also mention i have 2 ubuntu distros install to a non standard locations on another drive. I relocated them and then imported them again. the distros start up and run fine on the built in version of WSL on windows.

Or at least let me know how i can completely uninstall WSL cleanly, so i can just install the latest from the github site.

@jmihalich
Copy link
Author

jmihalich commented Oct 25, 2023

Hi, so I took a bold step, and fixed the problem. Since the issue seemed to be related to an apparently dead service WslService, i ran the following command to uninstall it:

sc delete WslService

Note that I had previously completely uninstalled all WSL Updates and the WSL Built in feature from Windows.

Once i removed the service, I reran the MSI installer for 2.0.6.0 and that succeeded. Now when I run wsl.exe --version, i correctly get:

WSL version: 2.0.6.0
Kernel version: 5.15.133.1-1
WSLg version: 1.0.59
MSRDC version: 1.2.4677
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.25880.1000-230602-1350.main
Windows version: 10.0.22621.2428

And all my distributions now run correctly.

@OneBlue
Copy link
Collaborator

OneBlue commented Oct 25, 2023

I'm curious on how your machine got into that state, but since the issue is resolved I'll close this. Please reopen if you hit the same issue again.

@OneBlue OneBlue closed this as completed Oct 25, 2023
@cgimenes
Copy link

cgimenes commented Nov 24, 2023

I'm having the same issue. But sc delete WslService didn't work for me.
I haven't used WSL for a couple weeks and today it just crashed with:

Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x8007019e
Error: 0x8007019e The Windows Subsystem for Linux has not been enabled.

Press any key to continue...

Tried disabling and enabling WSL in optionalfeatures.exe but it didn't work.
I also tried many wsl --update options, but none worked.
And lastly, I tried running the .msi package, but it failed with the service error above.
I can't see the service in services.msc, so, it may be a different issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants