How to run 32-bit app in Ubuntu 64-bit?
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
"No such file or directory" may appaear when you have your binary, but it lacks some libraries. If you install build-essential
package, you will have ldd
command available. This command ldd ./adb | grep not
will show you what libraries are missing. Just install these libraries in i386 arch with apt. Like this: apt-get install libmissing:i386
Beware, some buggy packages will try to delete 64bit version firs.
And if you want to use "adb" there is a package for it:
sudo apt-get install android-tools-adb
And about 32-bit libraries - only:
sudo apt-add-architecture i386
will be enough.