【发布时间】:2020-08-01 15:23:17
【问题描述】:
我用谷歌搜索了这个问题,一些答案宣称 WSL 2 现在支持 ELF 32 程序。
但是,在 wsl2 Debian/Ubuntu 发行版上的简单测试没有通过。
这是我的测试:
// install run-time
sudo dpkg --add-architecture i386
sudo apt-get update
// install build tools
sudo apt install build-essential
sudo apt install gcc-multilib
// build
gcc helloworld.c -m32
// run!
./a.out
bash: ./a.out: cannot execute binary file: Exec format error
指:
https://stackoverflow.com/questions/42120938/exec-format-error-32-bit-executable-windows-subsystem-for-linux
https://superuser.com/questions/1407730/run-32-bit-application-on-ubuntu-on-windows-subsystem-for-linux/1407818#1407818
【问题讨论】:
标签: windows-subsystem-for-linux