-
Notifications
You must be signed in to change notification settings - Fork 821
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
WSL2 cannot start VS Code #10363
Comments
I have a similar situation. The root cause seems to have been either a Windows Update or Ubuntu update (not sure which). However, the capability to run windows executables without running them explicitly through In the startup debug log I can see the following entry:
However,
Shortly before the above mentioned error during boot, there are a few more errors:
Also,
The setting can be set with
which makes the file appear:
And
However, this seems to fix only part of the issue. But may be helping in getting to the source of the problem. Btw, #10359 seems to be the same issue. |
My recent Ubuntu updates. The last one before the afore mentioned was:
Which I can ensure is not the cause as I have rebooted the host system between 2023-07-31 09:17:23 and 2023-08-03 09:44:37. However, I suspect it might have to do with KB5028244: |
#9353 (comment) indicates that disabling |
|
Also tried to nuke wslu earlier today with no luck. Uninstalled it and reinstalled it.
Based on this I just tried to disable systemd, which I've also been having enabled for a really long time. But I don't really depend on it. VSCode launches again however still get some weird errors on some commands. Enabling
which works fine before, or when I disable systemd.. 🤔 Seems like this has broken for a bunch of people during the last day.
I do not have any recent windows updates, everything was working normally the day before this post and in between I had a reboot. I've now also tried the prerelease version of WSL for science but no luck 😄 |
Since this might be a regression (by WSL or Ubuntu) that potentially is going to affect more and more people, I'm just trying to get some attention: @DHowett, @craigloewen-msft. Thanks! |
Hy guys, i have the same issue
😫 |
@martin-rueegg same situation here, also I can't run windows executables from WSL anymore Failed to execute process '/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/powershell.exe'. Reason:
exec: unknown error (errno was 8)
The file '/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/powershell.exe' is marked as an executable but could not be run by the operating system. |
@younes0 look for |
@elsaco I couldn't check, I removed the KB5028244 Windows Update and had to turn on again WSL & VM Machine as mentionned on https://superuser.com/a/1736464/256461 But you must be right, I managed to exec Windows executables when KB5028244 was installed by following this solution : https://stackoverflow.com/a/76826327/822837 |
The solution for my problem was opened /etc/wsl.conf and change the line systemd=true to #systemd=true I hope this help you! |
@renanlido thanks but then you disable systemd which I require in my setup |
And it does, on distros that don't have
The other unit file,
|
Following this resolved the below for me |
I started seeing this today. Very disrupting. 😢
Re: @elsaco
Edit: this resolved it for me as well #8952 (comment) |
this has resolved the issue on my wsl: #8952 (comment) fyi, this is the error I was getting as well: |
In my case, I need to remove |
In my case following this:
Resolved the issue. |
/dupe #8843 |
Hi! We've identified this issue as a duplicate of another one that already exists in this repository. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report! |
This also worked for me, I also wasn't able to run |
Windows Version
Microsoft Windows [Version 10.0.19045.3208]
WSL Version
1.2.5.0
Are you using WSL 1 or WSL 2?
Kernel Version
5.15.90.1-microsoft-standard-WSL2
Distro Version
Ubuntu-22.04
Other Software
VS code Version: 1.81.0 (system setup)
Commit: 6445d93c81ebe42c4cbd7a60712e0b17d9463e97
Date: 2023-08-02T12:37:13.485Z
Electron: 22.3.18
ElectronBuildId: 22689846
Chromium: 108.0.5359.215
Node.js: 16.17.1
V8: 10.8.168.25-electron.0
OS: Windows_NT x64 10.0.19045
Repro Steps
If I tried to open both a file or folder by vs code:
code . or code file.txt
I got the following error:
/mnt/c/Program Files/Microsoft VS Code/bin/code: 61: /mnt/c/Program Files/Microsoft VS Code/Code.exe: Exec format error
Expected Behavior
be able to open a file or folder without errors.
Actual Behavior
I got this error:
/mnt/c/Program Files/Microsoft VS Code/bin/code: 61: /mnt/c/Program Files/Microsoft VS Code/Code.exe: Exec format error
Diagnostic Logs
No response
The text was updated successfully, but these errors were encountered: