We build docker images using a debian/golang base. Today, quite suddenly, we started seeing an error:
E: Encountered a section with no Package: header
E: Problem with MergeList
Nothing changed on our end, just suddenly stopped working. If I remove mongo from the apt commands (e.g. don’t echo the package header and call update), then the build works again.
It looks like something is broken with http://repo.mongodb.org/apt/debian stretch/mongodb-org/4.0/main amd64
Relevant docker build commands:
Step 14/29 : RUN apt-get update && apt-get install -y gnupg && rm -rf /var/lib/apt/lists/*
---> Using cache
---> 35aa643018af
Step 15/29 : RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4
---> Using cache
---> ef7827fd065f
Step 16/29 : RUN echo "deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/4.0 main" | tee /etc/apt/sources.list.d/mongodb-org-4.0.list
---> Using cache
---> 993cfc0ff19e
Step 17/29 : RUN rm -rf /var/lib/apt/lists/* && apt-get clean && apt-get update && apt-get install -y libpcre++-dev libc6 libssl1.1 libssl-dev ca-certificates openssl apt-transport-https make gzip mongodb-org-tools git && rm -rf /var/lib/apt/lists/*
---> Running in 0ec47fbdb9e5
Ign:1 http://deb.debian.org/debian stretch InRelease
Get:2 http://security.debian.org/debian-security stretch/updates InRelease [94.3 kB]
Ign:3 http://repo.mongodb.org/apt/debian stretch/mongodb-org/4.0 InRelease
Get:4 http://deb.debian.org/debian stretch-updates InRelease [91.0 kB]
Get:5 http://deb.debian.org/debian stretch Release [118 kB]
Get:6 http://deb.debian.org/debian stretch Release.gpg [2410 B]
Get:7 http://security.debian.org/debian-security stretch/updates/main amd64 Packages [520 kB]
Get:8 http://repo.mongodb.org/apt/debian stretch/mongodb-org/4.0 Release [1492 B]
Get:9 http://repo.mongodb.org/apt/debian stretch/mongodb-org/4.0 Release.gpg [801 B]
Get:10 http://deb.debian.org/debian stretch-updates/main amd64 Packages [27.9 kB]
Get:11 http://deb.debian.org/debian stretch/main amd64 Packages [7083 kB]
Get:12 http://repo.mongodb.org/apt/debian stretch/mongodb-org/4.0/main amd64 Packages [12.4 kB]
Fetched 7951 kB in 3s (2127 kB/s)
Reading package lists...
E: Encountered a section with no Package: header
E: Problem with MergeList /var/lib/apt/lists/repo.mongodb.org_apt_debian_dists_stretch_mongodb-org_4.0_main_binary-amd64_Packages.lz4
E: The package lists or status file could not be parsed or opened.
The command '/bin/sh -c rm -rf /var/lib/apt/lists/* && apt-get clean && apt-get update && apt-get install -y libpcre++-dev libc6 libssl1.1 libssl-dev ca-certificates openssl apt-transport-https make gzip mongodb-org-tools git && rm -rf /var/lib/apt/lists/*' returned a non-zero code: 100
make[1]: *** [test-container] Error 100
make: *** [test-in-container] Error 2