0

Below is the docker file:

ENV CA_CERTIFICATES_JAVA_VERSION 20140324

RUN set -x \
    && apt-get update \
    && apt-get install -y \
        openjdk-8-jdk="$JAVA_DEBIAN_VERSION" \
        ca-certificates-java="$CA_CERTIFICATES_JAVA_VERSION" \
    && rm -rf /var/lib/apt/lists/* \
    && [ "$JAVA_HOME" = "$(docker-java-home)" ]

that gives error:

Step 16/26 : RUN set -x     && apt-get update   && apt-get install -y       openjdk-8-jdk="$JAVA_DEBIAN_VERSION"        ca-certificates-java="$CA_CERTIFICATES_JAVA_VERSION"    && rm -rf /var/lib/apt/lists/*  && [ "$JAVA_HOME" = "$(docker-java-home)" ]
 ---> Running in 6d823a145982
+ apt-get update
Get:1 https://apt.dockerproject.org debian-jessie InRelease [48.7 kB]
Get:2 http://archive.debian.org jessie-backports InRelease [166 kB]
Get:3 https://apt.dockerproject.org debian-jessie/main amd64 Packages [7366 B]
Get:4 http://security.debian.org jessie/updates InRelease [44.9 kB]
Ign http://deb.debian.org jessie InRelease
Get:5 http://deb.debian.org jessie-updates InRelease [16.3 kB]
Get:6 http://archive.debian.org jessie-backports/main amd64 Packages [1171 kB]
Get:7 http://deb.debian.org jessie Release.gpg [1652 B]
Get:8 http://deb.debian.org jessie Release [77.3 kB]
Get:9 http://security.debian.org jessie/updates/main amd64 Packages [892 kB]
Get:10 http://deb.debian.org jessie-updates/main amd64 Packages [20 B]
Get:11 http://deb.debian.org jessie/main amd64 Packages [9098 kB]
Fetched 11.5 MB in 14s (803 kB/s)
Reading package lists...
+ apt-get install -y openjdk-8-jdk=8u171-b11-1~bpo8+1 ca-certificates-java=20140324
Reading package lists...
Building dependency tree...
Reading state information...
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-8-jdk : Depends: openjdk-8-jre (= 8u171-b11-1~bpo8+1) but it is not going to be installed
                 Depends: openjdk-8-jdk-headless (= 8u171-b11-1~bpo8+1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
ERROR: Service 'slavedotnet' failed to build: The command '/bin/sh -c set -x    && apt-get update   && apt-get install -y       openjdk-8-jdk="$JAVA_DEBIAN_VERSION"        ca-certificates-java="$CA_CERTIFICATES_JAVA_VERSION"    && rm -rf /var/lib/apt/lists/*  && [ "$JAVA_HOME" = "$(docker-java-home)" ]' returned a non-zero code: 100

How to resolve this dependency issue?

1

You can’t resolve it, because openjdk-8-jre-headless breaks ca-certificates-java versions older than 20160321.

However I don’t think you need to resolve it:

apt-get install -y -t jessie-backports openjdk-8-jdk

works fine, and the resulting setup does have a /etc/ssl/certs/java/cacerts file.

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.