Friday, January 23, 2015

How to convert a .rpm file into a .deb file

To convert a .rpm file into a .deb file you need following packages:

 $ sudo apt-get install -y rpm alien libnuma1

Now the next step is to convert all the rpm files in the current folder into deb file format, and then install them with dpkg.  Create a shell file rpmtodeb.sh and write follwing lines into it.

#/bin/bash
 for f in *.rpm; do
   fakeroot alien --to-deb $f
 done
 for f in *.deb; do
   sudo dpkg -i $f
 done

Now, change the shell file permissions to make it executable

$ sudo chmod 777  rpmtodeb.sh

Run the shell file to start the conversion

$ sh rpmtodeb.sh




No comments:

Post a Comment