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

Systemd setup prevents wsl.exe from running #239

Open
rbutleriii opened this issue Sep 11, 2023 · 0 comments
Open

Systemd setup prevents wsl.exe from running #239

rbutleriii opened this issue Sep 11, 2023 · 0 comments

Comments

@rbutleriii
Copy link

rbutleriii commented Sep 11, 2023

When setting up systemd, if you enable it prior to creating the service file, you will get an error:

wsl.exe -d wsl-vpnkit --cd /app cat /app/wsl-vpnkit.service | sudo tee /etc/systemd/system/wsl-vpnkit.service
-bash: /mnt/c/WINDOWS/system32/wsl.exe: cannot execute binary file: Exec format error

There is a workaround here, copying the WSLInterop file one time and restarting.

sudo sh -c 'echo :WSLInterop:M::MZ::/init:PF > /usr/lib/binfmt.d/WSLInterop.conf'
sudo systemctl restart systemd-binfmt
WSL version: 1.2.5.0
Kernel version: 5.15.90.1
WSLg version: 1.0.51
MSRDC version: 1.2.3770
Direct3D version: 1.608.2-61064218
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.19045.3324
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

1 participant