How to install RPM package on ubuntu

How to install RPM package on ubuntu 1

Generally Ubuntu comes with lots of apt-get packages, which can be installed using apt-get command. But still some packages are not available in apt . Some of them can be manually added into local apt repository, some can be downloaded and installed manually.

Here, today we will discuss how to install RPM packages on ubuntu. Actually, I got one rpm package from one of our client. I found that rpm is not the default installable package on ubuntu (I am working on ubuntu 14.04). So I tried converting it to deb format. I followed following way

# Install alien

Alien comes with the Ubuntu apt-get package  and it is used to convert rpm file to deb format. It can also be used to install rpm file directly but that is not the best way to do. So, first we need to install alien and other necessary packages.

$ sudo apt-get install alien dpkg-dev debhelper build-essential

Alien install

# Convert the rpm package to deb

Once  rpm package is installed we need to convert rpm to deb. To convert this, it is very important to choose right rpm package according to your OS. my ubuntu is 64 bit and I got 32 bit rpm package from my client. That is the reason I got the error first and then I asked for 64 bit rpm package.

Error

Then, I got the right package and then converted this using following command

$ sudo alien <pkg>.rpm

rpm install

# Install the deb file

After successful conversion to deb file use dpkg  command to install it

$ sudo dpkg -i <pkg>.deb

DEB dpkg

Now the package is successfully installed on your system.

Have a look at this tutorial too ” How to send push notification to iOS using PHP

Try this and let me know the feedback in comment section. Cheers!!!