Ubundu 64位安装下执行32位代码报错-没有这样的文件或目录

发布于 2024-12-25 08:06:41 字数 1013 浏览 1 评论 0 原文

当我在 64 位 Ubundu 安装中运行 32 位可执行文件时,为什么会出现“没有这样的文件或目录”错误?

我期望的是:“文件无效”的消息,或者 32 位代码正确运行。

详情如下:

user@user-desktop:~/32_64$ ls
myfile32bit  myfile64bit

user@user-desktop:~/32_64$ file myfile32bit
myfile32bit: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, not stripped

user@user-desktop:~/32_64$ file myfile64bit
myfile64bit: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, not stripped

user@user-desktop:~/32_64$ ls -l
total 1532
-rwxrwxrwx 1 user user  126381 2011-10-11 13:20 myfile32bit
-rwxrwxrwx 1 user user  146785 2011-10-22 12:46 myfile64bit

user@user-desktop:~/32_64$ ./myfile64bit
Hello World

user@user-desktop:~/32_64$ ./myfile32bit
-bash: ./myfile32bit: No such file or directory

user@user-desktop:~/32_64$ uname -a
Linux user-desktop 2.6.32-33-generic #70-Ubuntu SMP Thu Jul 7 21:13:52 UTC 2011 x86_64 GNU/Linux

Why I am getting "No such file or directory" error when I am running 32 bit executable in a 64 bit Ubundu installation?

What I expect is : A message that "file is invalid", OR the 32 bit code get run correctly.

Details below:

user@user-desktop:~/32_64$ ls
myfile32bit  myfile64bit

user@user-desktop:~/32_64$ file myfile32bit
myfile32bit: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, not stripped

user@user-desktop:~/32_64$ file myfile64bit
myfile64bit: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, not stripped

user@user-desktop:~/32_64$ ls -l
total 1532
-rwxrwxrwx 1 user user  126381 2011-10-11 13:20 myfile32bit
-rwxrwxrwx 1 user user  146785 2011-10-22 12:46 myfile64bit

user@user-desktop:~/32_64$ ./myfile64bit
Hello World

user@user-desktop:~/32_64$ ./myfile32bit
-bash: ./myfile32bit: No such file or directory

user@user-desktop:~/32_64$ uname -a
Linux user-desktop 2.6.32-33-generic #70-Ubuntu SMP Thu Jul 7 21:13:52 UTC 2011 x86_64 GNU/Linux

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

独木成林 2025-01-01 08:06:41

由于时间的推移,标记为正确的答案不再有效。从版本 13 开始,不再存在 ia32-libs 包。相反,您必须安装以下内容:

lib32z1 lib32ncurses5 lib32bz2-1.0

这为我解决了版本 14 的问题。

更多信息请参见:http://community.secondlife.com/t5/Second-Life-Viewer/Ubuntu-13-10-and-the-death-of-ia32-libs/td-p/2269003

Due to the march of time the answer marked as correct no longer works. As of release 13 there no longer exists an ia32-libs package. Instead you must install the following:

lib32z1 lib32ncurses5 lib32bz2-1.0

This resolved the issue for me with release 14.

More here: http://community.secondlife.com/t5/Second-Life-Viewer/Ubuntu-13-10-and-the-death-of-ia32-libs/td-p/2269003

染火枫林 2025-01-01 08:06:41

以下链接对我有用。
当我尝试执行 32 位 eclipse 时,我的 Ubuntu 11.10 64 位遇到了类似的问题
它提示我“没有这样的文件或目录”。请点击此链接:

https://askubuntu.com/questions/147400/problems-with- eclipse-and-android-sdk

The following link worked for me.
I had similar problem with my Ubuntu 11.10 64 bit, when I tried to execute 32 bit eclipse
it prompted me "No such file or directory". Follow this link:

https://askubuntu.com/questions/147400/problems-with-eclipse-and-android-sdk

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文