If you’ve used Linux for any amount of time, you’ve noticed that one of the most common methods to install third party applications is via a .Deb package. Often times this is the only way to get this software, as the developers can’t be bothered to go through the process of packaging in the dozens of different formats the Linux platform offers.
Many non-Debian-based Linux distributions have their own ways of getting around this issue. However, out of all Linux distributions, Arch Linux has the most interesting ways of getting a Debian package working. In this article we’ll outline 3 ways on how to accomplish this and discuss which one is best.
Note: the steps below will work for any Arch-based distro as well.
Installing via the AUR
The AUR is the first place to check when looking for software that isn’t officially supported in Arch Linux. Always check here first. It’s a service that allows anyone to upload a PKGBUILD script, designed to automatically take software from various places, download all of the needed dependencies to run them and compile a native Arch Linux package.
When using the AUR, there are two ways to go about it. There’s the first way, which is the most used, using an AUR helper. These are tools that help make installing AUR packages (as well as keeping them up to date) incredibly easy. Just search, install and go.
The other way is by going to the AUR website, using the search bar, and downloading the “snapshot.” This is a less automated process, but it’s ultimately worth it, as instead of instantly installing the package, it’ll spit out a native package for later. This means if you have a custom repository setup, you can easily place these newly-built packages right in the repo for easy installation.
Most (if not all) programs that only come in DEB format will be found in the AUR. Here’s how to compile one as an Arch package from scratch.
1. Find a package in the AUR and click “download snapshot.”
2. Extract the snapshot, then open a terminal and
cd into it. For example:
to start the package creation process.
makepkg is finished, enter
sudo pacman -U *
to install the newly compiled package.
If for some reason a Deb you need isn’t in the AUR, install Debtap. It’s a program that works similar to how
makepkg does in that it can help decompile a Debian package and make it into an Arch one. Follow these quick instructions.
Start by installing Debtap via the AUR. Once installed, get the Deb you wish to convert and use the following command:
When finished, install the package with:
debtap -U *
Though not the most elegant solution, when there’s no way to convert with Debtap or compile with an AUR pkgbuild, the best method is to extract the Debian package itself and put the files where they should go.
Debian packages are archives with binaries inside, so no compiling is necessary. To install the files in any Deb package to Arch, first extract it to a folder. Keep in mind that you’ll also need to extract the archive known as “data” inside the Deb as well. Then, open a terminal.
For example, to install Google Chrome, you’d first
cd into the extracted Deb folder.
Then, run the
ls command to reveal all of the folders that reside in the data archive inside the Deb package. Keep in mind the names of these folders.
cd into each directory and move the contents of these directories to where they belong on the system.
cd ~/Downloads/google-chrome-stable_current_amd64/etc sudo mv * /etc/ cd ~/Downloads/google-chrome-stable_current_amd64/opt sudo mv * /opt/
One of the best things about Arch Linux is how many ways users can install packages – from the AUR, to custom repositories, to decompiling other distributions’ packages so they’ll run. Though this information isn’t new, it’s certainly a good resource for those new to Arch and looking for ways to install their favorite programs.