OSETC TECH

How to Install RPM Packages on Ubuntu

This post will guide you how to install PRM package on your Ubuntu Linux 18.04 or 16.04. How do I install PRM with Alien tool on your Ubuntu Linux system.

Install RPM Packages on Ubuntu


By default, if you want to install a tool in Ubuntu, you can use APT tool or Ubuntu software Center to install it. If this tool is not available on the default APT repository, you have to download the package with DEB format from its official website. Then you can use dpkg -I command to install it in Ubuntu terminal.
RPM packages can only be installed on Redhat or CentOS systems. Suppose you want to install a software tool on your current Ubuntu system, but you can only get the RPM package from its official website. What should we do? Can RPM packages be installed on Ubuntu systems? This article will show you how to install RPM packages in Ubuntu systems using Alien tools through the following steps:

Step1: before installing the Alien package on your ubuntu system, you need to add the Universe Repository to the default repository, just open a terminal and type the following command:

$ sudo add-apt-repository universe

Step2: you need to make sure that you APT repository is up-to-date with the following command:

$ sudo apt update
$ sudo apt upgrade -y

Step3: once the Universe repository is added, you can begin to install Alien tool by executing the following command:

$ sudo apt install alien

Outputs:

devops@devops:~$ sudo apt install alien
[sudo] password for devops:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
autoconf automake autopoint autotools-dev debhelper debugedit dh-autoreconf dh-strip-nondeterminism libarchive-cpio-perl libfile-stripnondeterminism-perl libltdl-dev
libmail-sendmail-perl librpm8 librpmbuild8 librpmio8 librpmsign8 libsigsegv2 libsys-hostname-long-perl libtool m4 po-debconf rpm rpm-common rpm2cpio
Suggested packages:
autoconf-archive gnu-standards autoconf-doc dh-make dwz rpm-i18n libtool-doc gfortran | fortran95-compiler gcj-jdk m4-doc libmail-box-perl elfutils rpmlint rpm2html
The following NEW packages will be installed:
alien autoconf automake autopoint autotools-dev debhelper debugedit dh-autoreconf dh-strip-nondeterminism libarchive-cpio-perl libfile-stripnondeterminism-perl
libltdl-dev libmail-sendmail-perl librpm8 librpmbuild8 librpmio8 librpmsign8 libsigsegv2 libsys-hostname-long-perl libtool m4 po-debconf rpm rpm-common rpm2cpio
0 upgraded, 25 newly installed, 0 to remove and 133 not upgraded.
Need to get 3,633 kB of archives.
After this operation, 11.1 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
……
Setting up libfile-stripnondeterminism-perl (0.040-1.1~build1) ...
Setting up libtool (2.4.6-2) ...
Setting up librpm8 (4.14.1+dfsg1-2) ...
Setting up rpm-common (4.14.1+dfsg1-2) ...
Setting up librpmsign8 (4.14.1+dfsg1-2) ...
Setting up autoconf (2.69-11) ...
Setting up librpmbuild8 (4.14.1+dfsg1-2) ...
Setting up rpm2cpio (4.14.1+dfsg1-2) ...
Setting up automake (1:1.15.1-3ubuntu2) ...
update-alternatives: using /usr/bin/automake-1.15 to provide /usr/bin/automake (automake) in auto mode
Setting up rpm (4.14.1+dfsg1-2) ...
Setting up dh-autoreconf (17) ...
Setting up dh-strip-nondeterminism (0.040-1.1~build1) ...
Setting up debhelper (11.1.6ubuntu2) ...
Setting up alien (8.95) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...

Step4: after Alien package is installed on your system, you can convert a rpm package to deb package. For example, you RPM package name is packagename.rpm. And you just need to run the following command:

$ sudo alien packagename.rpm

Step5: once the rpm package is converted successfully, you can install the converted package with the dpkg -I command:

$ sudo dpkg -I pakcagename.deb

Or

You can directly use alien command to install RPM packages on your Ubuntu system with the following command:

$ sudo alien -I packagename.rpm

Note: You’d better not use this method to install or upgrade packages in your Ubuntu sytems, because it may lead to package dependency conflicts or system instability. And not all RPM packages can be installed on Ubuntu system.

Conclusion


You should know that how to install RPM packages with Alien tool on your Ubuntu or Debian Linux.