How to Install RPM Packages on Ubuntu: Alien and rpm2cpio Guide
Learn how to install rpm packages on ubuntu using Alien to convert RPM to DEB, extract files with rpm2cpio, handle dependencies, and clean removal.

5 min read
Learn how to install rpm packages on ubuntu using Alien to convert RPM to DEB, extract files with rpm2cpio, handle dependencies, and clean removal.
- Prerequisites and Supported Releases
- Step 1: Understanding the Risks of Installing RPM Packages on Ubuntu
- Step 2: Installing Alien and Build Tools via APT
Linux distributions primarily divide into two major packaging ecosystems: the Debian family (utilizing .deb packages managed by APT and dpkg) and the Red Hat family (utilizing .rpm packages managed by DNF and RPM).
Occasionally, proprietary software vendors, hardware driver manufacturers, or legacy enterprise applications release binary packages exclusively in RPM format, without offering a corresponding Ubuntu .deb installer.
While Ubuntu cannot natively run the RPM package database as its primary package manager, you can safely convert RPM archives into native Debian packages or extract their file contents directly.
In this tutorial, we demonstrate how to install rpm packages on ubuntu using the battle-tested alien package converter tool, extract raw archive contents via rpm2cpio, and resolve library naming mismatches.
Comprehensive step-by-step administrator guide on how to convert, extract, and install Red Hat Package Manager (.rpm) software archives on Ubuntu 24.04 LTS and 22.04 LTS. Explains the architectural differences between RPM and DEB packages, converting RPM files into native Debian packages using Alien, direct one-step installation with alien -i, unpacking contents safely using rpm2cpio, managing shared library discrepancies, and removing converted packages cleanly.
Prerequisites and Supported Releases
This guide is thoroughly verified on Ubuntu 24.04 LTS (Noble Numbat) & Ubuntu 22.04 LTS. The instructions apply cleanly to cloud instances (AWS EC2, Google Compute Engine, DigitalOcean, Hetzner), bare-metal servers, and local virtual machines.
Before proceeding, ensure you have the following requirements satisfied:
- A server or workstation running Ubuntu 24.04 LTS or Ubuntu 22.04 LTS.
- A non-root user account with
sudoadministrative privileges. - A downloaded
.rpmfile on your local storage. - Access to a command-line terminal shell.
Step 1: Understanding the Risks of Installing RPM Packages on Ubuntu
Before converting or installing an RPM package, understand the underlying technical implications.
Debian and Red Hat systems utilize different naming conventions for standard C libraries, system directories, and initialization scripts.
An RPM package that expects Red Hat's httpd service may fail if installed on Ubuntu where the equivalent service is named apache2.
Never attempt to convert core system libraries (like glibc, PAM, or systemd); reserve RPM conversion strictly for standalone third-party user applications, proprietary printer drivers, or specialized enterprise utilities.
Step 2: Installing Alien and Build Tools via APT
alien is an open-source program that converts between different Linux package formats, including RPM, DEB, Stampede (.slp), and Slackware (.tgz).
Alien is available directly in Ubuntu's universe repository along with standard build utilities.
Update your package index and install alien along with rpm and build-essential:
# Update APT package lists:
sudo apt update
# Install Alien and RPM inspection tools:
sudo apt install -y alien rpm build-essential
# Verify Alien installation:
alien --version
# Expected output confirms: alien version 8.95 (or newer)
Step 3: Converting an RPM Package to a DEB Package with Alien
The safest workflow is converting the .rpm package into a standard .deb file first, allowing you to inspect the resulting package before installation.
Use the alien -d (or default alien) command to generate a Debian package:
Alien unpacks the RPM, maps file locations, generates Debian control metadata, and builds a new .deb package in your current directory:
# Convert RPM to DEB without installing:
sudo alien -d package_name.rpm
# Example output:
# package_name_1.0-2_amd64.deb generated
# Inspect the generated package contents using dpkg:
dpkg -c package_name_1.0-2_amd64.deb | head -n 25
Step 4: Installing the Converted DEB Package
Once Alien generates the .deb package, install it using the apt package manager.
Using apt install ./package.deb automatically checks and resolves any shared system dependencies required by the converted binary:
Execute the installation command:
# Install the newly generated .deb file using APT:
sudo apt install -y ./package_name_1.0-2_amd64.deb
# Verify that the application binary is registered and operational:
which application_name
application_name --version
Step 5: Direct One-Step Conversion and Installation (alien -i)
If you trust the RPM package and wish to convert and install it in a single command, use the -i flag.
Alien converts the package into a temporary Debian archive and invokes dpkg -i immediately:
Run the direct installation command:
# Convert and install RPM directly in a single step:
sudo alien -i package_name.rpm
# If dpkg encounters missing dependency libraries, resolve them with:
sudo apt --fix-broken install -y
Step 6: Extracting RPM Files Without Installation (rpm2cpio)
If you only need specific files, libraries, or scripts from an RPM package without registering the software into your system's package database, use rpm2cpio.
The rpm2cpio command converts the RPM archive stream into a standard cpio archive, which can be extracted into a standalone directory:
This method eliminates any risk of conflicting with Ubuntu's APT package database:
# Create an isolated extraction directory:
mkdir -p ~/extracted_rpm && cd ~/extracted_rpm
# Extract RPM contents into the current folder:
rpm2cpio /path/to/package_name.rpm | cpio -idmv
# View the extracted filesystem tree:
ls -la
# Output displays: usr/, etc/, opt/, or bin/ folders from the RPM
Troubleshooting and Common Errors
When configuring Ubuntu servers, unexpected permission errors, network timeouts, or lock contention can occur. Review these common issues and verified resolutions:
alien: command not found
Cause: The alien package is located in the Ubuntu universe component and is not installed.
Resolution: Enable the universe component and install alien: sudo add-apt-repository universe && sudo apt install -y alien.
sudo add-apt-repository universe && sudo apt install -y alien
error: Failed dependencies: /bin/sh is needed by package...
Cause: Alien attempts to evaluate RPM dependencies that use Red Hat package names not present in Ubuntu.
Resolution: Use the --nodeps flag to bypass RPM dependency checking: sudo alien -d --nodeps package.rpm.
sudo alien -d --nodeps package.rpm
Converted package breaks during execution: shared library libXYZ.so.1 not found
Cause: Ubuntu packages the required shared library under a slightly different package name or version.
Resolution: Search for the missing library using apt-file search libXYZ.so and install the corresponding Ubuntu package.
sudo apt install -y apt-file && sudo apt-file update && apt-file search libXYZ.so
Security Best Practices and Hardening
Never install unverified RPM packages downloaded from obscure forums or untrusted repositories.
Check whether an official Flatpak, Snap, AppImage, or source build exists before converting an RPM file.
Alien does not convert complex pre/post installation shell scripts by default (unless passing -g or --scripts), which can leave services unconfigured.
Related Ubuntu Tutorials and Documentation
Deepen your Linux system administration skills with our related production-tested guides:
- Install deb Files on Ubuntu: apt, dpkg, and gdebi — Master native Debian package installation, inspection, and dependency resolution.
- How to Uninstall Software Packages on Ubuntu — Cleanly remove applications, configurations, and residual packages.
apt Command in Linux: The Complete Package Management Guide— Comprehensive guide to Ubuntu's native APT package management system.
Authoritative References and Official Documentation

The Linux Command Line, 2nd Edition: A Complete Introduction
Frequently Asked Questions
Quick answers to common questions and configurations
rpm binary can be installed via APT to query RPM files, you should never use RPM or DNF to manage system packages on Ubuntu. Ubuntu's operating system relies exclusively on the dpkg database; managing software with RPM will corrupt system package tracking.dpkg -l | grep package_name, then remove it using standard APT: sudo apt purge package_name.--scripts instructs Alien to include and attempt to convert those maintainer scripts.Editorial Disclosure: Website Vidya is supported by our readers. When you purchase hosting, tools, or software through our verified partner links, we may earn an affiliate commission at no extra cost to you. We only recommend solutions we trust and rigorously verify.
Rajesh Ray
I’m Rajesh Rai, a full-stack developer, Linux administrator, and technology enthusiast passionate about making complex technology easier to understand and use.
Most Read Guides
TrendingUbuntu Server Not Booting? 10 Simple Steps to Fix It Fast
How to Create a 3D Button in HTML and CSS: Easy Steps
How to Install Python and Pip on Ubuntu 24.04 LTS
How to Install Nginx on Ubuntu 24.04
How to Install Python on Ubuntu 24.04 LTS
Related Technical Guides
Tested runbooks, server administration walkthroughs, and troubleshooting guides


Join the Conversation & Perspective
Have thoughts, counterpoints, or reflections on this story? Engage directly with fellow readers and editorial contributors.
No comments on this guide yet. Be the first to share your thoughts or ask a question!