小编Lei*_*ila的帖子

收到错误:bash:(程序):无法执行二进制文件:Exec 格式错误,在 32 位和 64 位 Windows 上

有一个为语言研究开发的程序(http://people.csail.mit.edu/mcollins/code.html)。当我尝试在 Windows 上使用 Git bash 终端运行解析器时,出现错误:

bash: cannot execute binary file: Exec format error.
Run Code Online (Sandbox Code Playgroud)

首先,我认为这是因为我的 64 位操作系统,因为该文件是 32 位的。因此,我在 32 位系统上尝试了该程序,但得到了相同的消息。

关于如何解决这个问题有什么想法吗?:

file (program)显示:

ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.2.5, with debug_info, not stripped
Run Code Online (Sandbox Code Playgroud)

uname -srv对于我的 64 位操作系统,显示:

MINGW64_NT-10.0-19042 3.1.7-340.x86_64 2021-03-26 22:17 UTC
Run Code Online (Sandbox Code Playgroud)

uname -srv对于我的 32 位操作系统,显示:

MINGW32_NT-6.1-7601 3.1.7-340.i686 2021-03-26 22:01 UTC
Run Code Online (Sandbox Code Playgroud)

PS:如果你想尝试一下,这段代码应该可以在程序目录中运行,但它对我不起作用:

gunzip -c models/model2/events.gz | code/parser examples/sec23.tagged models/model2/grammar 10000 1 1 1 1 …
Run Code Online (Sandbox Code Playgroud)

unix windows bash executable elf

8
推荐指数
1
解决办法
9万
查看次数

标签 统计

bash ×1

elf ×1

executable ×1

unix ×1

windows ×1