1

My server is currently running on Debian Stretch:

Linux *** 4.9.0-8-amd64 #1 SMP Debian 4.9.144-3.1 (2019-02-19) x86_64 GNU/Linux

I tried to install openjdk-11-jdk. This is not part of the stable Stretch. So I added backports to my sources according instructions:

deb http://deb.debian.org/debian stretch-backports main

The installing of the package failed to unavailable dependencies:

536:root:/opt# apt-get update
[...]

537:root:/opt# apt-get -t stretch-backports install "openjdk-11-jdk"
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 openjdk-11-jdk : Depends: openjdk-11-jre (= 11.0.3+7-5~bpo9+1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

538:root:/opt# apt-get -t stretch-backports install "openjdk-11-jre"
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 openjdk-11-jre : Depends: libgif7 (>= 5.1) but it is not installable
                  Recommends: libatk-wrapper-java-jni (>= 0.30.4-0ubuntu2) but it is not installable
E: Unable to correct problems, you have held broken packages.

539:root:/opt# aptitude -t stretch-backports install "openjdk-11-jdk"
The following NEW packages will be installed:
  openjdk-11-jdk openjdk-11-jdk-headless{a} openjdk-11-jre{ab} openjdk-11-jre-headless{a}
0 packages upgraded, 4 newly installed, 0 to remove and 86 not upgraded.
Need to get 223 MB of archives. After unpacking 364 MB will be used.
The following packages have unmet dependencies:
 openjdk-11-jre : Depends: libgif7 (>= 5.1) which is a virtual package and is not provided by any available package

The following actions will resolve these dependencies:

     Keep the following packages at their current version:
1)     openjdk-11-jdk [Not Installed]
2)     openjdk-11-jre [Not Installed]

Accept this solution? [Y/n/q/?] q
Abandoning all efforts to resolve these dependencies.
Abort.

I do not know how to resolve these dependencies.

Update:

599:root:~# apt policy
Package files:
 100 /var/lib/dpkg/status
     release a=now
 100 http://deb.debian.org/debian stretch-backports/main amd64 Packages
     release o=Debian Backports,a=stretch-backports,n=stretch-backports,l=Debian Backports,c=main,b=amd64
     origin deb.debian.org
 500 http://ftp.de.debian.org/debian stretch-updates/main amd64 Packages
     release o=Debian,a=oldstable-updates,n=stretch-updates,l=Debian,c=main,b=amd64
     origin ftp.de.debian.org
 500 http://security.debian.org stretch/updates/main amd64 Packages
     release v=9,o=Debian,a=oldstable,n=stretch,l=Debian-Security,c=main,b=amd64
     origin security.debian.org
Pinned packages:
  • Could you edit your question to show the output of apt policy? – Stephen Kitt Jul 12 at 15:09
1

I can't see an entry for the stretch/main repository in your apt policy output which is needed to install the libgif7 package.

Try this:

  • add the main repository to your /etc/apt/sources.list:

    deb http://ftp.de.debian.org/debian stretch main
    
  • then run

    apt-get update
    apt-get -t stretch-backports install openjdk-11-jdk
    

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.