Debian & Ubuntu Linux: Install a package from backports


if you require a newer version of a package on a debian based system it may be possible that it is backportet from the latest testing line.

For example, you want use OpenJDK 11 on debian stretch.

First of all add the backport repository.

root@debdev ~ # echo deb stretch-backports main > /etc/apt/sources.list.d/stretch-backports.list
root@debdev ~ # apt-get update

Search for OpenJDK

root@debdev ~ # apt-cache search openjdk
openjdk-8-jdk-headless - OpenJDK Development Kit (JDK) (headless)
openjdk-11-jdk-headless - OpenJDK Development Kit (JDK) (headless)

To get/show the repository a package comes from

root@debdev ~ # apt-cache policy openjdk-11-jdk-headless
 *** 11.0.3+1-1~bpo9+2 100
        100 stretch-backports/main amd64 Packages
        100 /var/lib/dpkg/status

Install the package

root@debdev ~ # apt-get -t stretch-backports install openjdk-11-jdk-headless

If the package name is unique you can omit the -t switch

root@debdev ~ # apt-get install openjdk-11-jdk-headless


Reverse Phone Lookup

Advertisment to support

Leave a Reply

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

Time limit is exhausted. Please reload CAPTCHA.