Convert DEB to RPM or RPM to DEB Package

You can convert DEB file to RPM package and RPM to DEB package using alien command, if you have a *.rpm file that you want to install on a Debian or Ubuntu.

Convert RPM to DEB

Install alien command on Ubuntu as mentioned here:

# sudo apt-get install alien

Now, use alien command to convert rpm to deb file,

# alien clamav-0.92.1-1.el5.rf.i386.rpm

clamav-0.92.1-1.el5.rf.i386.deb generated

Finally, Install deb packages using the dpkg command,

# dpkg -i clamav-0.92.1-1.el5.rf.i386.deb

Where,
-i = install a package

Convert DEB to RPM

Use alient -r option to convert a deb file to rpm file.

# alien -r clamav-0.92.1-1.el5.rf.i386.deb

clamav-0.92.1-1.el5.rf.i386.rpm generated

Once you generate the rpm file, you can install it on Red Hat, Fedora or CentOS.
Finally install rpm,

# rpm -ivh clamav-0.92.1-1.el5.rf.i386.rpm

Where,
-i = Install RPM
-v = Install in verbose Mode
-h = Print  50  hash  marks  as the package archive is unpacked

nJoy 😉

 

Leave a Reply

Your email address will not be published. Required fields are marked *