运行 32 位可执行文件

运行 32 位可执行文件

我正在尝试在 64 位 oneric 上运行 32 位可执行文件。下面是情况的简要概述。但我必须预先安装 ia32 库:

> aptitude search ia32
i   ia32-libs - ia32 shared libraries for use on amd64 and ia64 syste

首先我测试了文件类型:

> file tipp10
tipp10: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.4, not stripped

我正在使用 64 位 oneric,内核不是那么新,因为我还没有重新启动。

> uname -a
Linux christchurch 3.0.0-14-generic #23-Ubuntu SMP Mon Nov 21 20:28:43 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux

正如我所说,正常执行不起作用。它会因找不到文件或目录而中止。

> strace ./tipp10
execve("./tipp10", ["./tipp10"], [/* 46 vars */]) = -1 ENOENT (No such file or directory)
dup(2)                                  = 3
fcntl(3, F_GETFL)                       = 0x8002 (flags O_RDWR|O_LARGEFILE)
fstat(3, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 2), ...}) = 0
[...]

这是我的系统上的 ldd 输出。在我的 64 位 Debian 服务器上,该程序被识别为动态链接程序,并输出一些库引用。但在我的 ubuntu 上:

> ldd tipp10
    \tdas Programm ist nicht dynamisch gelinkt
# german for: "The programm is not linked dynamic"

有人能帮帮我吗?我不明白发生了什么事。

答案1

这对我有帮助:

sudo apt-get install --reinstall libc6-i386
sudo apt-get install libgl1-mesa-glx:i386 lsb-core

来源: https://bugs.launchpad.net/ubuntu/+source/ia32-libs/+bug/852101?comments=all

相关内容