OpenJDK installation is failing
rakeshnambiar opened this issue ยท 5 comments
OpenJDK installation is failing.
Hi, @nikolaik please could you advise how to solve the issue while installing RUN apt-get install -y openjdk-8-jdk
. This step was working fine with the Node10 base image.
Do you have any output from the failing install command?
@nikolaik yes
Step 23/48 : RUN apt-get install -y openjdk-8-jdk
---> Running in c4e7c6085752
Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package openjdk-8-jdk
The command '/bin/sh -c apt-get install -y openjdk-8-jdk' returned a non-zero code: 100
E: Unable to locate package openjdk-8-jdk
This indicates that there is no package called openjdk-8-jdk
available in any repository apt has fetch package metadata from.
You are trying to install a legacy version of openjdk which was last available in debian stretch, openjdk-8-jdk. These images have switched the debian base image to debian buster and bullseye a while ago.
For newer distros (that these images use) you need to use openjdk-11-jdk for buster or bullseye, or if you can, openjdk-17-jdk.
Thanks @nikolaik I haven't upgraded it to jdk11 since I was unsure about the dependency. But it's compatible and all went well with jdk11 and python 3.7