Thursday, May 2, 2024
 Popular · Latest · Hot · Upcoming
246
rated 0 times [  246] [ 0]  / answers: 1 / hits: 473627  / 2 Years ago, thu, may 26, 2022, 9:55:57

I installed Ubuntu 14.04 and the current Android development SDK, which contains 32-bit executables. I found that I cannot run those 32-bit binaries. Trying to start them from bash gives me an error:


$ ./adb
bash: ./adb: No such file or directory

It is there though:


$ ls -al ./adb
-rwxrwxrwx 1 thomas thomas 1231255 Jan 17 13:31 ./adb
$ file ./adb
./adb: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.8, not stripped.

Same symptom for all the other 32-bit tools in the Android SDK.


In olden days one could just install 32-bit libraries on 64-bit Ubuntu to get 32-bit support, but that does not seem to work anymore.


How do I run 32-bit apps on a 64-bit Ubuntu distribution?


More From » 64-bit

 Answers
2

To run a 32-bit executable file on a 64-bit multi-architecture Ubuntu system, you have to add the i386 architecture and install the three library packages libc6:i386, libncurses5:i386, and libstdc++6:i386:



sudo dpkg --add-architecture i386


Or if you are using Ubuntu 12.04 LTS (Precise Pangolin) or below, use this:



echo "foreign-architecture i386" > /etc/dpkg/dpkg.cfg.d/multiarch


Then:



sudo apt-get update
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386


If fails, do also



sudo apt-get install multiarch-support


After these steps, you should be able to run the 32-bit application:



./example32bitprogram

[#25719] Friday, May 27, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
barted

Total Points: 424
Total Questions: 103
Total Answers: 101

Location: Djibouti
Member since Sun, Feb 27, 2022
2 Years ago
;