9

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
Lunar Mushrooms
  • 8,358
  • 18
  • 66
  • 88

3 Answers3

8

There is a great article about this exact problem here:

http://www.markusbe.com/2009/09/about-running-32-bit-programs-on-64-bit-ubuntu-and-shared-libraries/

Ken Nickel
  • 209
  • 1
  • 2
  • 1
    Your link is asking for a password to open. – Evandro Coan Aug 05 '18 at 17:00
  • It's accessible through the Wayback Machine: https://web.archive.org/web/20170916024357/http://www.markusbe.com:80/2009/09/about-running-32-bit-programs-on-64-bit-ubuntu-and-shared-libraries/ – wmli Oct 04 '18 at 14:48
4

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

BobDoolittle
  • 1,326
  • 1
  • 12
  • 21
3

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

Community
  • 1
  • 1
Ravi Mathi
  • 31
  • 1
  • 2
    This article has the same suggestion as the one that was already posted (and accepted). If you want to improve on the existing answer, consider summarizing the article's approach directly in your answer, which the original poster could also have done. – GargantuChet Sep 24 '12 at 20:12