3 ms·
From the comments, WSL2 is not needed: The procedure to use 32-bit under WSL-1 is the following: enable i386 architecture install multilibs instal
by slacka 7y ago
From the comments, WSL2 is not needed:
The procedure to use 32-bit under WSL-1 is the following:
enable i386 architecture
install multilibs
install qemu-user-static
register 32-bit elf magic to be executed through qemu-i386-static:
$ sudo update-binfmts --install i386 /usr/bin/qemu-i386-static --magic '\x7fELF\x01\x01\x01\x03\x00\x00\x00\x00\x00\x00\x00\x00\x03\x00\x03\x00\x01\x00\x00\x00' --mask '\xff\xff\xff\xff\xff\xff\xff\xfc\xff\xff\xff\xff\xff\xff\xff\xff\xf8\xff\xff\xff\xff\xff\xff\xff'
reload binfmt:
$ sudo service binfmt-support start
and it executes x86 elf on WSL
More info on this technique here: https://stackoverflow.com/questions/42120938/exec-format-error-32-bit-executable-windows-subsystem-for-linux https://stackoverflow.com/questions/42120938/exec-format-err...