我正在尝试在我的 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"
谁能帮助我。我不明白发生了什么事。