Skip to main content

How to enable Backports in Debian?



If you are using a stable release of the Debian distribution, you know that it contains only packages of a certain version. For example, php 5.6. And, until the distribution kit in this thread is updated, you will not be able to install a more recent version of the software ...

... Until you connect an additional, but official repository of backports packages. It provides newer versions of certain packages. For example, if nginx version 1.6.2 is located in the standard repository, then from backports you can install version 1.9.10, which includes many necessary improvements.



To add this repository, you need to create a backports.list file in the /etc/apt/sources.list.d/ directory and put a single line there:

  deb http://ftp.ru.debian.org/debian jessie-backports main 

Or any other mirror closest to your server.

The whole thing can be done with one command:


 echo -e "deb http://packages.dotdeb.org jessie all \ ndeb-src http://packages.dotdeb.org jessie all"> /etc/apt/sources.list.d/dotdeb.list 

Then update the list of available packages: aptitude update .

Packages from the backports repository will not be installed by default, as the latest versions. Their installation must be performed with the command:

  aptitude install -t jessie-backports packagename 

Where, instead of "packagename", you need to specify the name of the package.



Updating already installed packages from the stable branch to the jessie-backports branch is done by the same team.

Conflicts with other repositories

Conflict can occur, for example, when using the dotdeb repository. In my case, I needed to install only php7 . But with a full upgrade, the aptitude upgrade command from the dotdeb repository pulls nginx of a different version.

Everything would be nice if it were not for the fact that nginx in dotdeb is compiled without openssl 1.0.2h support. And this is necessary for the work of ALPN.

The way out of this situation is the following: for packages from dotdeb that do not need to be updated, you should lower the priority. Create a dotdeb file in the /etc/apt/preferenses.d/ directory and write the contents there:

  Package: nginx *
 Pin: origin packages.dotdeb.org
 Pin-Priority: -10 

In the example, nginx. But it can be replaced by the name of another package.

When you save this file, the package manager will no longer offer updates from the dotdeb repository.



How do you rate the article?
Звёзд: 1Звёзд: 2Звёзд: 3Звёзд: 4Звёзд: 5 ( 2 ratings, average: 5.00 out of 5)
Loading...

Add a comment

Your email will not be published.