How to use Ubuntu PPA's in Debian
Ubuntu is the most popular Linux distribution in the world. As a result, it enjoy's more third party support than most other distributions, including Ubuntu's parent, Debian.
Ubuntu packages don't always work on Debian. Actually, more often than not, there's some kind of problem running or installing them. Plus, Debian isn't really set up to interact with Ubuntu PPAs.
Install the Dependencies
Before you start, there are a couple of general build dependencies that you'll need. Of course, you need the general build tools, plus some Debian packaging scripts.# apt install build-essential devscriptsThat's really all! You might need some specific dependencies for the package that you want, but that'll be later.
Add the Source PPA

Next, you'll need to find a PPA that you want to use. Most Ubuntu PPAs have a section where you can view the actual
deb
and deb-src
records. On Launchpad, it's under a menu labeled "Technical details about this PPA." You'll need to copy the deb-src
record.
.list
file under /etc/apt/sources.list.d/
for your new PPA. Select the version of Ubuntu that is the closest match to your version of Debian.deb-src http://ppa.launchpad.net/commendsarnex/winedri3/ubuntu artful main
Import The Key

You've got to import the signing key from the PPA in order for Apt to update your repositories and install. It's usually displayed prominently on the PPA homepage. Copy the key following the
/
. Then, run the following linux command using your copied key.
# apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys THE_KEYAfter Apt imports the key, run an update.
# apt update
Build

cd
into that directory. Once inside that directory, run the following linux command to build your packages. Substitute the name of the package that you want to build and the version of Ubuntu your PPA is from.$ apt source -t artful --build packagename

This will take some time, depending on the package. This is the place where you may encounter dependency errors. There are a few ways to solve them. You can manually copy the list provided by the script, and install them. If the package is a variation of an existing Debian package, you can use
apt build-dep
. Unfortunately, that won't work with your PPA. Apt only allows build-dep
from the default repository.Install With DPKG

Once you have your packages, you can install them as root using
dpkg
. It does take wildcards, so as long as there aren't any other Debian packages in your build directory, you can do something like this:dpkg -i *.debUnless there is some strange unforeseen conflict(There shouldn't be, since you built them), your new packages will install on Debian.
Or you can directly install packages as you do in Ubuntu
sudo apt-get install package_name
This might not work on every package
This won't work in every situation, but it will work in most. If the source isn't available, you won't be able to build the packages. You can certainly try installing the existing binaries, but understand that it is a risk to do so.
Comments
Post a Comment