/How to Install Debian Packages on Scientific Linux 6

How to Install Debian Packages on Scientific Linux 6

I have been asked to install quite a few programs on a machine running Scientific Linux 6. Some of the programs do not offer rpm package or source code. The only way to install them is through apt-get. In order for me to install these programs on Scientific Linux, I need to convert the deb packages to rpm format. Before you follow the following procedures, note that this is not supported and it could break your system. Use it as the last resort and test them in a testing environment first. I will use a package called libgtkglext1 as an example.

  1. You will need a Debian based distribution to get the packages. You can install one using VitrualBox if you do not have access to a new machine.
  2. On the Debian box, install the alien package.
    sudo apt-get install alien
  3. We first need to get the deb package without installing it. Note that there might be other packages needed. Make a note of the supporting package names.
    sudo apt-get --download-only install libgtkglext1
  4. Find out the file name of the deb package. Do this for all the packages needed.
    ls /var/cache/apt/archives/libgtkglext1*
  5. Convert the deb file to rpm file. The last argument is from the output of step 4. Remember to convert the supporting packages too.
    alien --to-rpm --scripts /var/cache/apt/archives/libgtkglext1_1.2.0-2_amd64.deb
  6. Transfer the rpm file to the machine and install it.
    sudo rpm -Uvh libgtkglext1-1.2.0-3.x86_64.rpm