WSL2 Error “cannot execute binary file Exec format error“
症状
使用非Ubuntu发行版wsl,且开启了systemd,在wsl中运行windows程序报错
1  | ❯ code  | 
解决
1  | sudo sh -c 'echo :WSLInterop:M::MZ::/init:PF > /usr/lib/binfmt.d/WSLInterop.conf'  | 
使用非Ubuntu发行版wsl,且开启了systemd,在wsl中运行windows程序报错
1  | ❯ code  | 
1  | sudo sh -c 'echo :WSLInterop:M::MZ::/init:PF > /usr/lib/binfmt.d/WSLInterop.conf'  |