Convert RPM to DEB or DEB to RPM
Sometimes you need a package but only a package for another distribution is available. What can you do?
This article explains converting RPM to DEB and DEB to RPM: converting a Red Hat-family package (.rpm) to a Debian/Ubuntu-family package (.deb), or vice versa.
You need a program called alien.
For RPM-family distributions such as CentOS, Red Hat, SUSE, or Fedora, download alien-8.77-1.src.rpm. I built this as a .src.rpm so you can rebuild it for your own distribution.
Rebuild the RPM with:
[root@tum ~]# rpmbuild --rebuild alien-8.77-1.src.rpm
This produces an RPM file. Install it with the rpm command below:
[root@tum ~]# rpm -ihv alien-8.77-1.rpm
For Ubuntu, use:
[root@tum ~]# sudo apt-get install alien
Usage Example conversion from .rpm to .deb:
[root@tum ~]# alien -d file.rpm file.deb
Example conversion from .deb to .rpm:
[root@tum ~]# alien -r file.deb. file.rpm