Installing Debian Unstable’s Source Packages in Debian Jessie

Sometimes a package that you need is not available for Debian Jessie, but you can find it in Sid (unstable). You may be tempted to try to install it manually by downloading the binary deb package, but it will most likely fail due to binary incompatibilities with the different library versions you have. The better method is to get the source package used to build the binary package and build it yourself. Most of the time, the process is not as hard as it sounds.

First, a short preliminary setup is needed. Add the following lines to /etc/apt/sources.list:

deb http://http.debian.net/debian jessie-backports main
deb-src http://httpredir.debian.org/debian unstable main contrib

You can replace unstable with testing if you prefer to use packages from testing. Update the package lists:

sudo apt-get update

Next, you need to get the build dependencies for your package. The example below uses the package lyx:

sudo apt-get build-dep lyx/unstable

Now you are ready to fetch and build the source package:

sudo apt-get source -b lyx/unstable

Finally, you will see the resulting DEBs in the current directory. Simply install them:

sudo gdebi lyx-common_2.1.4-2_all.deb
sudo gdebi lyx_2.1.4-2_amd64.deb

You can later mark the dependencies that you manually installed as automatic:

sudo apt-mark auto lyx-common

Leave a Reply

Your email address will not be published. Required fields are marked *