use*_*654 48 files executable binary fortran
我无法在 ubuntu 11.10 32 位中执行 fortran 编译代码。
错误信息是
bash: ./filename : Cannot execute binary file.
Run Code Online (Sandbox Code Playgroud)
我也安装了 gcc 和 gfortran 库。
有人可以帮忙吗?
$ file um
um: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped
Run Code Online (Sandbox Code Playgroud)
elm*_*cha 46
从file um您在评论中发布的输出可以看出,您的二进制文件是 64 位二进制文件。
32 位系统不能运行 64 位二进制文件,它只能以相反的方式运行。
小智 6
除了有关不匹配位的部分之外,遇到此问题的人的另一个解决方案是在没有命令“bash”的情况下运行文件。
只需使用chmod +x 'path to the file'然后'the path to the file'在终端中运行。这就是我解决问题的方法。