Problems installing jdk8 in flex

321 views
Skip to first unread message

Vinay Chitlangia

unread,
Feb 3, 2017, 11:54:05 AM2/3/17
to Google App Engine

I am facing some problem when trying to install openjdk-8 in the flex environment.

Our setup is to use jetty9-compat runtime with openjdk-8 (We install jdk to do dynamic compilation). The setup was working fine till about 2-3 days back.

Now when I try to install I get the following error:


The following packages have unmet dependencies:

 openjdk-8-jdk : Depends: openjdk-8-jre (= 8u121-b13-1~bpo8+1) but 8u111-b14-2~bpo8+1 is to be installed

                 Depends: openjdk-8-jdk-headless (= 8u121-b13-1~bpo8+1) but it is not going to be installed



Our dockerfile is:

FROM gcr.io/google_appengine/jetty9-compat

RUN apt-get -q update && \

    apt-get -y -q --no-install-recommends install openjdk-8-jdk && \

    apt-get clean && \

    rm /var/lib/apt/lists/*_*

ADD . /app

Adam (Cloud Platform Support)

unread,
Feb 3, 2017, 4:35:38 PM2/3/17
to Google App Engine
It looks like openjdk-8-jre was updated in jessie-backports but openjdk-8-jdk-headless wasn't updated in the same repository (by the Debian maintainers). Two things you can try are:

1) Use the version from the 'stable' distribution in your Dockerfile:
apt-get -y -q --no-install-recommends install -t stable openjdk-8-jdk && \


2) Manually install the needed dependency before openjdk-8-jdk:
apt-get -y -q --no-install-recommends install openjdk-8-jdk-headless=8u121-b13-1~bpo8+1 && \

The second step would only work if that version existed in a repository, and you had that repo in your /etc/apt/sources.list (eg. 'testing' or 'unstable'), so further messing about with that may be necessary.

Vinay Chitlangia

unread,
Feb 6, 2017, 11:06:45 PM2/6/17
to Google App Engine
Thanks Adam.
In case anybody is facing a similar issue. This is the command that worked.
apt-get ----no-install-recommends install -t jessie-backports openjdk-8-jdk && \

Cesar Oyarzun

unread,
Feb 7, 2017, 3:42:54 PM2/7/17
to Google App Engine
Hey Vinay I did try your comand but it doesn't work for me I'm getting this error

E: The value 'jessie-backports' is invalid for APT::Default-Release as such a release is not available in the sources

Adam (Cloud Platform Support)

unread,
Feb 7, 2017, 4:11:41 PM2/7/17
to Google App Engine
To use the backports repo you actually need to add it to your sources.list, as covered in the Debian Backports Instructions:
  1. For jessie add this line

    deb http://ftp.debian.org/debian jessie-backports main
    to your sources.list (or add a new file with the ".list" extension to /etc/apt/sources.list.d/) You can also find a list of other mirrors athttps://www.debian.org/mirror/list
  2. Run apt-get update

Vinay Chitlangia

unread,
Feb 7, 2017, 11:14:50 PM2/7/17
to Google App Engine


On Wednesday, February 8, 2017 at 2:12:54 AM UTC+5:30, Cesar Oyarzun wrote:
Hey Vinay I did try your comand but it doesn't work for me I'm getting this error

E: The value 'jessie-backports' is invalid for APT::Default-Release as such a release is not available in the sources

There was one typo in my command (Note to self: Dont type when you can copy!!). Copy pasting the Dockerfile that worked for me.

FROM gcr.io/google_appengine/jetty9-compat

RUN apt-get -q update && \

    apt-get -y -q --no-install-recommends -t jessie-backports install openjdk-8-jdk && \

Reply all
Reply to author
Forward
0 new messages