Error in ECS , During installation of jdk ‘E: Problem with MergeList /jdk-15.0.2_linux-x64_bin.deb’

I am trying to install jdk 15.0.2 in ECS using Dockerfile but get the below error during a docker build

E: Sub-process Popen returned an error code (2) E: Encountered a
section with no Package: header E: Problem with MergeList
/jdk-15.0.2_linux-x64_bin.deb

Below is the Dockerfile :

FROM ubuntu:bionic-20191010

RUN apt-get update -y

RUN apt-get install wget -y

RUN mkdir javainst
 
RUN cd javainst
 
RUN apt-get clean

RUN wget --no-check-certificate -c --header "Cookie: oraclelicense=accept-securebackup-cookie" https://download.oracle.com/otn/java/jdk/15.0.2%2B7/0d1cfde4252546c6931946de8db48ee2/jdk-15.0.2_linux-x64_bin.deb

RUN apt install -y ./jdk-15.0.2_linux-x64_bin.deb


RUN apt-get install python3 -y
RUN apt-get install -y python3-pip
RUN pip3 install boto3
RUN pip3 install pandas

Below is the full error log:

Step 8/18 : RUN apt install -y ./jdk-15.0.2_linux-x64_bin.deb
 ---> Running in 8120d0e018eb

WARNING: apt does not have a stable CLI interface. Use with caution in
scripts.

Reading package lists…
E: Sub-process Popen returned an error code (2) E: Encountered a section with no Package: header E: Problem with MergeList
/jdk-15.0.2_linux-x64_bin.deb E: The package lists or status file
could not be parsed or opened. The command ‘/bin/sh -c apt install -y
./jdk-15.0.2_linux-x64_bin.deb’ returned a non-zero code: 100

[Container] 2021/07/30 04:41:25 Command did not exit successfully
docker build -t $ECR_REPO:$IMAGE_TAG . exit status 100 [Container]
2021/07/30 04:41:25 Phase complete: BUILD State: FAILED [Container]
2021/07/30 04:41:25 Phase context status code: COMMAND_EXECUTION_ERROR
Message: Error while executing command: docker build -t
$ECR_REPO:$IMAGE_TAG .. Reason: exit status 100 [Container] 2021/07/30
04:41:25 Entering phase POST_BUILD [Container] 2021/07/30 04:41:25
Running command echo Build completed on date Build completed on Fri
Jul 30 04:41:25 UTC 2021

Leave a Comment