How to Enable Multilib (32-bit Support) on Arch Linux
Categories:
6 minute read
Arch Linux, known for its simplicity and flexibility, is a distribution that caters primarily to advanced users. By default, Arch Linux is a 64-bit operating system and doesn’t include 32-bit (x86_32) libraries, which can sometimes be required for running older applications or games designed for 32-bit systems. However, with Arch’s rolling release model and its powerful package management system, enabling 32-bit support (multilib) on Arch Linux is a relatively straightforward process. This guide will walk you through the steps to enable multilib support on your Arch system.
What is Multilib Support?
In Linux, “multilib” refers to the ability of a system to run both 32-bit and 64-bit software. In the context of Arch Linux, enabling multilib support allows you to install 32-bit libraries alongside the 64-bit ones. This is particularly useful for applications like games, software with 32-bit dependencies, or legacy applications that have not been updated to work on 64-bit systems.
Why Enable Multilib on Arch Linux?
There are several reasons why you might want to enable multilib on Arch Linux:
Running Older Software: Many older applications were built for 32-bit systems and might not have been updated or ported to 64-bit. This is especially common with video games or older proprietary software.
Compatibility: Certain proprietary drivers or third-party tools might only be available as 32-bit versions, and enabling multilib can allow you to run those applications without any issues.
Gaming: Many gaming platforms, such as Steam and certain games that rely on Wine or Proton, often require 32-bit libraries to run older games or applications that have not been updated to 64-bit.
Software Development: Developers who are targeting a broad range of systems, including 32-bit architectures, may need to test their applications on 32-bit libraries while working on a 64-bit system.
Prerequisites
Before proceeding, ensure that you have the following:
- A running Arch Linux system (this guide assumes you are using a 64-bit installation of Arch).
- Root privileges (either through
sudo
or direct root access). - A working internet connection to download the necessary packages.
Step 1: Update Your System
Before making any changes to your system, it is always a good idea to update your existing packages to the latest versions. This ensures that you are not working with outdated software and dependencies.
To update your system, open a terminal and run the following command:
sudo pacman -Syu
This will update the system’s package database and upgrade all installed packages. Once the update process is complete, you may need to restart your system if any core components were updated.
Step 2: Enable the Multilib Repository
The primary step in enabling multilib support is to enable the multilib repository. This repository contains the 32-bit packages required for running 32-bit applications on a 64-bit system.
Edit the pacman configuration file: You need to edit the
/etc/pacman.conf
file to uncomment the multilib repository. Open the file in a text editor with root privileges. For example, you can usenano
:sudo nano /etc/pacman.conf
Uncomment the multilib section: Look for the section labeled
[multilib]
in the configuration file. By default, it is commented out with a#
at the beginning of each line. Remove the#
characters to enable the multilib repository.Before:
#[multilib] #Include = /etc/pacman.d/mirrorlist
After:
[multilib] Include = /etc/pacman.d/mirrorlist
Save and exit: After uncommenting the relevant lines, save the file and exit the text editor. In
nano
, you can save by pressingCtrl + O
, then pressEnter
, and exit by pressingCtrl + X
.
Step 3: Update the Package Database
Once you have enabled the multilib repository, you need to update the package database to include the new multilib repository.
Run the following command:
sudo pacman -Sy
This command will synchronize your system’s package database, ensuring that the newly enabled multilib repository is included.
Step 4: Install 32-bit Libraries
With multilib support enabled, you can now install 32-bit libraries. Arch’s package manager pacman
handles this process for you. To install 32-bit libraries, you simply need to include the lib32-
prefix before the name of the package you want to install.
Example: Installing 32-bit Libraries for Steam
One of the most common use cases for enabling multilib is installing Steam, as it requires several 32-bit libraries to function correctly on a 64-bit system.
To install Steam, use the following command:
sudo pacman -S lib32-steam
This will install the necessary 32-bit libraries for Steam, including any dependencies.
Example: Installing Wine (for running Windows applications)
If you are using Wine to run Windows applications on Arch Linux, you will need to install the 32-bit version of Wine. This can be done with:
sudo pacman -S wine
sudo pacman -S lib32-wine
The second command installs the 32-bit Wine libraries, ensuring compatibility with 32-bit Windows applications.
Example: Installing 32-bit System Libraries
If you want to install a specific 32-bit library or a set of libraries, you can do so by using the lib32-
package names. For example, to install 32-bit versions of libraries that some applications may require, use the following command:
sudo pacman -S lib32-glibc
This will install the 32-bit version of the GNU C Library, which is a common dependency for 32-bit applications.
Step 5: Verify Multilib Installation
Once you have installed the necessary 32-bit libraries, you can verify that everything is working properly. To check if the multilib packages are installed correctly, you can query the installed packages.
Run the following command to list the installed lib32-
packages:
pacman -Q | grep lib32
This should display a list of all 32-bit libraries and applications currently installed on your system.
For example:
lib32-glibc 2.34-3
lib32-steam 1.0.0.70-1
lib32-wine 6.0-1
This indicates that the 32-bit libraries are installed and functioning correctly.
Step 6: Running 32-bit Applications
Now that you have installed the necessary 32-bit libraries, you can run 32-bit applications alongside your 64-bit software. These applications should automatically link against the 32-bit libraries when needed.
For example, to run Steam, you would simply execute the following command:
steam
Similarly, if you are using Wine to run Windows applications, you can run your 32-bit Windows applications using Wine.
Troubleshooting
While enabling multilib on Arch Linux is generally a straightforward process, you may encounter a few issues along the way. Here are some common troubleshooting steps:
Missing dependencies: If you run into errors regarding missing dependencies, you can use
pacman
to search for and install the appropriatelib32-
package.For example, if you get an error indicating that
lib32-something
is missing, you can search for it:pacman -Ss lib32-something
Corrupted package database: If you experience issues with updating or installing packages, it might be due to a corrupted package database. You can force an update of the package database with:
sudo pacman -Syyu
Conflicting packages: In rare cases, you might run into conflicts between 32-bit and 64-bit packages. You can resolve these by manually removing conflicting packages or using the
--overwrite
flag withpacman
to force the installation.
Conclusion
Enabling multilib support on Arch Linux allows you to run 32-bit applications on a 64-bit system, which is essential for using legacy software, running games, or working with certain proprietary tools. By editing the pacman.conf
file, enabling the multilib repository, and installing the necessary 32-bit libraries, you can easily set up a mixed environment that supports both 64-bit and 32-bit applications.
As with any change to your system, it’s essential to keep your system updated and monitor for any compatibility issues. With multilib support in place, you can enjoy a greater range of applications on Arch Linux while maintaining the speed, flexibility, and performance that the distribution offers.
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.