Exec格式错误32位可执行Windows Linux子系统? [英] Exec format error 32-bit executable Windows Subsystem for Linux?
本文介绍了Exec格式错误32位可执行Windows Linux子系统?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我尝试在 Linux子系统上执行使用 gcc -m32 main.c -o main
编译的32位文件时,我收到以下错误: bash:./main:无法执行二进制文件:Exec格式错误
。
When I try to execute a 32-bit file compiled with gcc -m32 main.c -o main
on Windows Subsystem for Linux, I get the following error: bash: ./main: cannot execute binary file: Exec format error
.
如果我在没有运行的情况下编译 -m32
。
If I compile it without -m32
it runs.
针对的任何解决方案在WSL上运行32位可执行文件?
推荐答案
WSL尚未提供32位ELF支持。自从UserVoice提出以来,似乎没有任何进展-您真倒霉。
32-bit ELF support isn't provided by WSL (yet). There doesn't seem to be any progress since the UserVoice was raised - you are out luck.
请参阅 UserVoice :请向内核添加32位ELF支持和对32位i386 ELF二进制文件的支持。
如果可能,请切换到 real Linux;-)
If possible, switch to a real Linux ;-)
这篇关于Exec格式错误32位可执行Windows Linux子系统?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文