How to Install RPM Packages on Ubuntu

RPM packages are designed for Red Hat-based distributions like Fedora and CentOS, making them incompatible with Ubuntu’s native DEB package format. However, when software is only available as an RPM file, you can convert it to DEB format using the alien tool. This guide walks through downloading RPM packages, converting them with Alien, installing the resulting DEB files, and resolving common dependency issues that arise during conversion.

Converting RPM packages should be a last resort. Native DEB packages, Flatpak applications, Snap packages, or AppImages provide better integration, automatic updates, and fewer dependency conflicts. Only use Alien when no native alternative exists for your software.

Update Your Ubuntu System

Before installing new packages, refresh your package index and apply any pending updates. This ensures your system has the latest dependency information and reduces potential conflicts during installation:

sudo apt update && sudo apt upgrade

If the upgrade includes kernel updates or a significant number of packages, restart your system before continuing to ensure all changes take effect.

Install Alien for RPM Conversion

Alien is a package conversion tool that transforms RPM packages into DEB format. It handles the package metadata translation, file placement, and basic dependency mapping between the two formats. Install it from Ubuntu’s default repositories:

sudo apt install alien -y

After installation completes, verify Alien is accessible by checking its version:

alien --version

Expected output confirming successful installation:

alien version 8.95.6

The exact version number varies depending on your Ubuntu release, but any output showing a version confirms Alien is ready to use.

Convert and Install RPM Packages

The conversion process involves downloading the RPM file, running Alien to create a DEB package, and then installing the result. Each step requires careful attention to ensure successful installation.

Download the RPM Package

First, obtain the RPM file from the software vendor’s official website or a trusted repository. Save it to a convenient location such as your Downloads folder. When downloading, verify you are getting the correct architecture for your system:

uname -m

Expected output for most desktop systems:

x86_64

Download RPM packages matching this architecture. Files labeled x86_64 or amd64 work on 64-bit systems, while i686 or i386 are for 32-bit systems.

Convert RPM to DEB Format

Navigate to the directory containing your downloaded RPM file. For files saved to the Downloads folder:

cd ~/Downloads

Next, run Alien to convert the RPM to DEB format. Replace package-name.rpm with your actual filename:

sudo alien package-name.rpm

Alien produces Debian packages by default. Conversion time depends on package size, but most complete within a few seconds. When finished, Alien creates a .deb file in the same directory with the same base name.

Alien converts package metadata but cannot translate Red Hat-specific dependencies to their Ubuntu equivalents. Complex packages with many dependencies often fail during installation or produce non-functional software. Simple, self-contained packages convert most reliably.

Install the Converted Package

With the DEB file created, install it using dpkg. Replace package-name.deb with the actual filename Alien generated:

sudo dpkg -i package-name.deb

If the package installs without errors, you can proceed to verification. However, dependency errors are common with converted packages. When dpkg reports missing dependencies, run the following command to automatically install them:

sudo apt --fix-broken install

This command instructs APT to resolve dependency issues by downloading and installing the required packages from Ubuntu’s repositories. After completion, verify the software is functional by running its main executable or checking its version.

Verify Package Installation

Confirm the package is properly registered with your system’s package manager. Replace package-name with the software name (not the filename):

dpkg -l | grep package-name

A successful installation shows output starting with ii, indicating the package is installed and configured:

ii  package-name   1.0.0   amd64   Package description here

Finally, test the software by launching it from your application menu or running its command in the terminal. If the application opens and functions correctly, the conversion and installation succeeded.

Troubleshoot Common Conversion Issues

RPM-to-DEB conversion frequently encounters problems because the two package formats handle dependencies, file paths, and system integration differently. The following issues occur most often.

Missing Dependencies After Installation

If the software fails to run after installation, it likely requires libraries that were not installed as dependencies. Check what libraries the application expects:

ldd /usr/bin/program-name | grep "not found"

Replace /usr/bin/program-name with the actual path to the installed executable. This command lists any shared libraries the program needs but cannot find. Search for Ubuntu packages providing those libraries:

apt-file search libmissing.so

Install apt-file first if not already present: sudo apt install apt-file && sudo apt-file update.

Conversion Fails Completely

When Alien cannot process an RPM file, it typically indicates an incompatible package format or corrupted download. Verify the file integrity:

file package-name.rpm

Expected output for a valid RPM:

package-name.rpm: RPM v3.0 bin i386/x86_64

If the output shows something other than an RPM file (such as HTML or text), the download was corrupted or redirected. Re-download from the original source.

Package Conflicts with Existing Software

Converted packages occasionally attempt to overwrite files owned by other packages. When dpkg reports file conflicts, you have two options: force the installation (risky) or remove the conflicting package first. To identify the conflicting package:

dpkg -S /path/to/conflicting/file

This shows which installed package owns the file. Decide whether to remove that package or abandon the converted package installation.

Remove Alien and Converted Packages

If you no longer need Alien or want to remove software installed through conversion, follow these steps.

Remove Converted Software

Uninstall packages that were converted from RPM format using standard APT commands. Replace package-name with the installed package name:

sudo apt remove package-name

To also remove configuration files:

sudo apt purge package-name

Remove Alien

When you no longer need to convert RPM packages, remove Alien and its dependencies:

sudo apt remove alien
sudo apt autoremove

The autoremove command cleans up packages that were installed as dependencies for Alien but are no longer needed by any other software. Verify removal completed:

alien --version

Expected output confirming Alien is no longer installed:

bash: alien: command not found

Clean Up Downloaded Files

After installation, you can safely delete the original RPM file and the converted DEB file from your Downloads folder:

rm ~/Downloads/package-name.rpm ~/Downloads/package-name.deb

These files are only needed during installation and serve no purpose afterward.

Final Thoughts

Alien provides a practical workaround when software is only distributed as RPM packages, converting them to Ubuntu-compatible DEB format through metadata translation and file restructuring. However, converted packages lack the reliability of native software. Dependencies may not resolve correctly, system integration can be incomplete, and automatic updates are unavailable. Before converting an RPM, check whether the software offers a native DEB package, a Flatpak version, a Snap package, or an AppImage. These alternatives provide better long-term maintenance and fewer compatibility issues.

1 thought on “How to Install RPM Packages on Ubuntu”

Leave a Comment