Software & AppsOperating SystemLinux

How To Run 32-bit Apps on Ubuntu 64-bit

Ubuntu 4

Running 32-bit applications on a 64-bit Ubuntu system can seem like a daunting task, especially for beginners. However, with the right guidance and steps, this process can be made straightforward. This article will walk you through the process of running 32-bit apps on Ubuntu 64-bit.

Quick Answer

To run 32-bit apps on Ubuntu 64-bit, you need to add the i386 architecture, update the package lists, install the required 32-bit libraries, and then run the app. It may seem complex at first, but following these steps will make the process straightforward and manageable.

Understanding the Basics

Before we delve into the process, it’s important to understand the difference between 32-bit and 64-bit systems. Essentially, these numbers refer to the way a computer’s processor (also known as the CPU), handles information. The 64-bit version of Ubuntu handles large amounts of random access memory (RAM) more effectively than a 32-bit system.

In some cases, you might need to run a 32-bit application on a 64-bit Ubuntu system. This could be because the software developer only provides a 32-bit version, or because you’re using older hardware.

Step 1: Adding the i386 Architecture

The first step in this process is to add the i386 architecture to your system. This can be done by opening a terminal and running the following command:

sudo dpkg --add-architecture i386

The sudo command allows you to run the command as a superuser, while dpkg is a tool to install, build, remove and manage packages. The --add-architecture flag adds a new architecture to the front of the architecture set.

For users on Ubuntu 12.04 LTS or below, the following command should be used instead:

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

The echo command outputs the string provided to it. In this case, it outputs “foreign-architecture i386” and the > operator redirects this output to the specified file.

Step 2: Updating the Package Lists

Next, you need to update your package lists. This is done by running the following command:

sudo apt-get update

The apt-get command is a powerful command-line tool used for dealing with packages, and update is one of its functions. This command updates the list of available packages and their versions, but it does not install or upgrade any packages.

Step 3: Installing the Required 32-bit Libraries

After updating the package lists, you can install the required 32-bit libraries by running the following command:

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

The install function of apt-get is used to install the specified packages. libc6, libncurses5, and libstdc++6 are libraries that many applications need to run.

If you encounter any issues, you can also try installing the multiarch-support package:

sudo apt-get install multiarch-support

Step 4: Running the 32-bit Application

Once the libraries are installed, you should be able to run the 32-bit application. This can be done using the command:

./example32bitprogram

The ./ before the program name is used to specify the program’s location. In this case, it means that the program is in the current directory.

Troubleshooting

In some cases, additional libraries may be required. You can use the ldd command to check for any missing libraries. For example:

ldd ./adb | grep not

The ldd command prints the shared libraries required by each program or shared library specified on the command line. grep is a command-line utility for searching plain-text data sets for lines that match a regular expression. In this case, it’s used to filter out lines that contain the word “not”, which typically indicates a missing library.

Then, install the missing libraries using the apt-get install command, specifying the library name followed by :i386.

Conclusion

In summary, running a 32-bit app on a 64-bit Ubuntu system involves adding the i386 architecture, updating the package lists, installing the necessary 32-bit libraries, and then running the app. While it may seem complex at first, following these steps should make the process straightforward and manageable.

Why do I need to run 32-bit apps on a 64-bit Ubuntu system?

You may need to run 32-bit apps on a 64-bit Ubuntu system if the software developer only provides a 32-bit version or if you are using older hardware that is only compatible with 32-bit apps.

How do I add the i386 architecture to my Ubuntu system?

To add the i386 architecture, open a terminal and run the command sudo dpkg --add-architecture i386. For Ubuntu 12.04 LTS or below, use the command echo "foreign-architecture i386" > /etc/dpkg/dpkg.cfg.d/multiarch.

What does the `apt-get update` command do?

The apt-get update command updates the list of available packages and their versions. It does not install or upgrade any packages.

What libraries do I need to install for running 32-bit apps?

You need to install the libc6:i386, libncurses5:i386, and libstdc++6:i386 libraries. These are commonly required libraries for many 32-bit applications. If you encounter any issues, you can also try installing the multiarch-support package.

How do I run a 32-bit application on Ubuntu?

Once the required libraries are installed, you can run a 32-bit application using the command ./example32bitprogram. Make sure to specify the correct location of the program by including ./ before the program name.

How can I check for missing libraries?

You can use the ldd command followed by the program name to check for missing libraries. For example, ldd ./adb | grep not will display any missing libraries. Install the missing libraries using the apt-get install command, specifying the library name followed by :i386.

Is running 32-bit apps on a 64-bit Ubuntu system complicated?

While it may seem complex at first, following the steps provided in this guide should make the process straightforward and manageable. With the right guidance, running 32-bit apps on a 64-bit Ubuntu system is not overly complicated.

Leave a Comment

Your email address will not be published. Required fields are marked *