docker-library / openjdk

Docker Official Image packaging for EA builds of OpenJDK from Oracle
http://openjdk.java.net
MIT License
1.14k stars 471 forks source link

openjdk:10-jre-slim has dpkg errors while trying to install package? #400

Closed dathdev closed 4 years ago

dathdev commented 4 years ago

Hi, I have a Dockerfile that uses openjdk:10-jre-slim as the source image. First thing it does is apt update and apt install -y curl, but it fails with this error:

A copy of the C library was found in an unexpected directory:
  '/usr/lib/x86_64-linux-gnu/ld-2.27.so'
It is not safe to upgrade the C library in this situation;
please remove that copy of the C library or get it out of
'/usr/lib/x86_64-linux-gnu' and try again.

dpkg: error processing archive /var/cache/apt/archives/libc6_2.30-3_amd64.deb (--unpack):
 new libc6:amd64 package pre-installation script subprocess returned error exit status 1
Selecting previously unselected package libcrypt1:amd64.
dpkg: considering deconfiguration of libc6:amd64, which would be broken by installation of libcrypt1:amd64 ...
dpkg: yes, will deconfigure libc6:amd64 (broken by libcrypt1:amd64)
Preparing to unpack .../libcrypt1_1%3a4.4.15-1_amd64.deb ...
De-configuring libc6:amd64 (2.27-8) ...
Unpacking libcrypt1:amd64 (1:4.4.15-1) ...
Errors were encountered while processing:
 /var/cache/apt/archives/libc6_2.30-3_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

I tried running apt update && apt install -r curl on an interactive container, it fails with the same error and I can't find a way around this.

Edit: it works on openjdk:11-jre-slim and fails on openjdk:9-jre-slim. The difference I'm seeing is the apt repositories on the update step, so I'm guessing 9 and 10 are using unstable repositories?

Edit2: I tried copying the etc/apt/sources.list file from 11 to 9 and 10 and they worked perfectly. But I think this is still something worth addressing as we shouldn't use unstable repositories in official images.

wglambert commented 4 years ago

Duplicate of https://github.com/docker-library/openjdk/issues/399

We don't maintain an openjdk:10 or openjdk:9 version https://github.com/docker-library/openjdk/pull/254 This is our support matrix of OpenJDK versions/variants: https://github.com/docker-library/openjdk/issues/272

Using an image that we do support I'm not able to reproduce

docker build ```console $ docker build . -t openjdk:11-test Sending build context to Docker daemon 38.15MB Step 1/3 : FROM openjdk:11-jre-slim 11-jre-slim: Pulling from library/openjdk 68ced04f60ab: Already exists 4874c5772968: Pull complete 8afa8e973e22: Pull complete d5c28bc4eb55: Pull complete Digest: sha256:738d88797946515e4016a09c14cee07db317b0d534fe82e76afad688864abe77 Status: Downloaded newer image for openjdk:11-jre-slim ---> 1ea6dd6e01bf Step 2/3 : ENV DEBIAN_FRONTEND=noninteractive ---> Running in bbc3069afdd0 Removing intermediate container bbc3069afdd0 ---> cb91e0c32469 Step 3/3 : RUN apt-get update && apt-get install -y git ---> Running in 4d3d195efe52 Get:1 http://security.debian.org/debian-security buster/updates InRelease [65.4 kB] Get:2 http://deb.debian.org/debian buster InRelease [122 kB] Get:3 http://deb.debian.org/debian buster-updates InRelease [49.3 kB] Get:4 http://security.debian.org/debian-security buster/updates/main amd64 Packages [183 kB] Get:5 http://deb.debian.org/debian buster/main amd64 Packages [7907 kB] Get:6 http://deb.debian.org/debian buster-updates/main amd64 Packages [7380 B] Fetched 8334 kB in 2s (4865 kB/s) Reading package lists... Reading package lists... Building dependency tree... Reading state information... The following package was automatically installed and is no longer required: lsb-base Use 'apt autoremove' to remove it. The following additional packages will be installed: git-man krb5-locales less libbsd0 libcurl3-gnutls libedit2 liberror-perl libexpat1 libgdbm-compat4 libgdbm6 libgssapi-krb5-2 libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0 libldap-2.4-2 libldap-common libnghttp2-14 libpcre2-8-0 libperl5.28 libpsl5 librtmp1 libsasl2-2 libsasl2-modules libsasl2-modules-db libssh2-1 libx11-6 libx11-data libxau6 libxcb1 libxdmcp6 libxext6 libxmuu1 netbase openssh-client patch perl perl-modules-5.28 publicsuffix xauth Suggested packages: gettext-base git-daemon-run | git-daemon-sysvinit git-doc git-el git-email git-gui gitk gitweb git-cvs git-mediawiki git-svn gdbm-l10n krb5-doc krb5-user sensible-utils libsasl2-modules-gssapi-mit | libsasl2-modules-gssapi-heimdal libsasl2-modules-ldap libsasl2-modules-otp libsasl2-modules-sql keychain libpam-ssh monkeysphere ssh-askpass ed diffutils-doc perl-doc libterm-readline-gnu-perl | libterm-readline-perl-perl make libb-debug-perl liblocale-codes-perl The following NEW packages will be installed: git git-man krb5-locales less libbsd0 libcurl3-gnutls libedit2 liberror-perl libexpat1 libgdbm-compat4 libgdbm6 libgssapi-krb5-2 libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0 libldap-2.4-2 libldap-common libnghttp2-14 libpcre2-8-0 libperl5.28 libpsl5 librtmp1 libsasl2-2 libsasl2-modules libsasl2-modules-db libssh2-1 libx11-6 libx11-data libxau6 libxcb1 libxdmcp6 libxext6 libxmuu1 netbase openssh-client patch perl perl-modules-5.28 publicsuffix xauth 0 upgraded, 41 newly installed, 0 to remove and 0 not upgraded. Need to get 19.5 MB of archives. After this operation, 100 MB of additional disk space will be used. Get:1 http://security.debian.org/debian-security buster/updates/main amd64 libcurl3-gnutls amd64 7.64.0-4+deb10u1 [330 kB] Get:2 http://deb.debian.org/debian buster/main amd64 perl-modules-5.28 all 5.28.1-6 [2873 kB] Get:3 http://deb.debian.org/debian buster/main amd64 libgdbm6 amd64 1.18.1-4 [64.7 kB] Get:4 http://deb.debian.org/debian buster/main amd64 libgdbm-compat4 amd64 1.18.1-4 [44.1 kB] Get:5 http://deb.debian.org/debian buster/main amd64 libperl5.28 amd64 5.28.1-6 [3883 kB] Get:6 http://deb.debian.org/debian buster/main amd64 perl amd64 5.28.1-6 [204 kB] Get:7 http://deb.debian.org/debian buster/main amd64 less amd64 487-0.1+b1 [129 kB] Get:8 http://deb.debian.org/debian buster/main amd64 netbase all 5.6 [19.4 kB] Get:9 http://deb.debian.org/debian buster/main amd64 krb5-locales all 1.17-3 [95.4 kB] Get:10 http://deb.debian.org/debian buster/main amd64 libbsd0 amd64 0.9.1-2 [99.5 kB] Get:11 http://deb.debian.org/debian buster/main amd64 libedit2 amd64 3.1-20181209-1 [94.0 kB] Get:12 http://deb.debian.org/debian buster/main amd64 libkeyutils1 amd64 1.6-6 [15.0 kB] Get:13 http://deb.debian.org/debian buster/main amd64 libkrb5support0 amd64 1.17-3 [65.6 kB] Get:14 http://deb.debian.org/debian buster/main amd64 libk5crypto3 amd64 1.17-3 [121 kB] Get:15 http://deb.debian.org/debian buster/main amd64 libkrb5-3 amd64 1.17-3 [370 kB] Get:16 http://deb.debian.org/debian buster/main amd64 libgssapi-krb5-2 amd64 1.17-3 [158 kB] Get:17 http://deb.debian.org/debian buster/main amd64 openssh-client amd64 1:7.9p1-10+deb10u2 [782 kB] Get:18 http://deb.debian.org/debian buster/main amd64 libsasl2-modules-db amd64 2.1.27+dfsg-1+deb10u1 [69.1 kB] Get:19 http://deb.debian.org/debian buster/main amd64 libsasl2-2 amd64 2.1.27+dfsg-1+deb10u1 [106 kB] Get:20 http://deb.debian.org/debian buster/main amd64 libldap-common all 2.4.47+dfsg-3+deb10u1 [89.6 kB] Get:21 http://deb.debian.org/debian buster/main amd64 libldap-2.4-2 amd64 2.4.47+dfsg-3+deb10u1 [225 kB] Get:22 http://deb.debian.org/debian buster/main amd64 libnghttp2-14 amd64 1.36.0-2+deb10u1 [85.0 kB] Get:23 http://deb.debian.org/debian buster/main amd64 libpsl5 amd64 0.20.2-2 [53.7 kB] Get:24 http://deb.debian.org/debian buster/main amd64 librtmp1 amd64 2.4+20151223.gitfa8646d.1-2 [60.5 kB] Get:25 http://deb.debian.org/debian buster/main amd64 libssh2-1 amd64 1.8.0-2.1 [140 kB] Get:26 http://deb.debian.org/debian buster/main amd64 libexpat1 amd64 2.2.6-2+deb10u1 [106 kB] Get:27 http://deb.debian.org/debian buster/main amd64 libpcre2-8-0 amd64 10.32-5 [213 kB] Get:28 http://deb.debian.org/debian buster/main amd64 liberror-perl all 0.17027-2 [30.9 kB] Get:29 http://deb.debian.org/debian buster/main amd64 git-man all 1:2.20.1-2+deb10u1 [1620 kB] Get:30 http://deb.debian.org/debian buster/main amd64 git amd64 1:2.20.1-2+deb10u1 [5620 kB] Get:31 http://deb.debian.org/debian buster/main amd64 libsasl2-modules amd64 2.1.27+dfsg-1+deb10u1 [104 kB] Get:32 http://deb.debian.org/debian buster/main amd64 libxau6 amd64 1:1.0.8-1+b2 [19.9 kB] Get:33 http://deb.debian.org/debian buster/main amd64 libxdmcp6 amd64 1:1.1.2-3 [26.3 kB] Get:34 http://deb.debian.org/debian buster/main amd64 libxcb1 amd64 1.13.1-2 [137 kB] Get:35 http://deb.debian.org/debian buster/main amd64 libx11-data all 2:1.6.7-1 [298 kB] Get:36 http://deb.debian.org/debian buster/main amd64 libx11-6 amd64 2:1.6.7-1 [754 kB] Get:37 http://deb.debian.org/debian buster/main amd64 libxext6 amd64 2:1.3.3-1+b2 [52.5 kB] Get:38 http://deb.debian.org/debian buster/main amd64 libxmuu1 amd64 2:1.1.2-2+b3 [23.9 kB] Get:39 http://deb.debian.org/debian buster/main amd64 patch amd64 2.7.6-3+deb10u1 [126 kB] Get:40 http://deb.debian.org/debian buster/main amd64 publicsuffix all 20190415.1030-1 [116 kB] Get:41 http://deb.debian.org/debian buster/main amd64 xauth amd64 1:1.0.10-1 [40.3 kB] debconf: delaying package configuration, since apt-utils is not installed Fetched 19.5 MB in 0s (57.9 MB/s) Selecting previously unselected package perl-modules-5.28. (Reading database ... 6888 files and directories currently installed.) Preparing to unpack .../00-perl-modules-5.28_5.28.1-6_all.deb ... Unpacking perl-modules-5.28 (5.28.1-6) ... Selecting previously unselected package libgdbm6:amd64. Preparing to unpack .../01-libgdbm6_1.18.1-4_amd64.deb ... Unpacking libgdbm6:amd64 (1.18.1-4) ... Selecting previously unselected package libgdbm-compat4:amd64. Preparing to unpack .../02-libgdbm-compat4_1.18.1-4_amd64.deb ... Unpacking libgdbm-compat4:amd64 (1.18.1-4) ... Selecting previously unselected package libperl5.28:amd64. Preparing to unpack .../03-libperl5.28_5.28.1-6_amd64.deb ... Unpacking libperl5.28:amd64 (5.28.1-6) ... Selecting previously unselected package perl. Preparing to unpack .../04-perl_5.28.1-6_amd64.deb ... Unpacking perl (5.28.1-6) ... Selecting previously unselected package less. Preparing to unpack .../05-less_487-0.1+b1_amd64.deb ... Unpacking less (487-0.1+b1) ... Selecting previously unselected package netbase. Preparing to unpack .../06-netbase_5.6_all.deb ... Unpacking netbase (5.6) ... Selecting previously unselected package krb5-locales. Preparing to unpack .../07-krb5-locales_1.17-3_all.deb ... Unpacking krb5-locales (1.17-3) ... Selecting previously unselected package libbsd0:amd64. Preparing to unpack .../08-libbsd0_0.9.1-2_amd64.deb ... Unpacking libbsd0:amd64 (0.9.1-2) ... Selecting previously unselected package libedit2:amd64. Preparing to unpack .../09-libedit2_3.1-20181209-1_amd64.deb ... Unpacking libedit2:amd64 (3.1-20181209-1) ... Selecting previously unselected package libkeyutils1:amd64. Preparing to unpack .../10-libkeyutils1_1.6-6_amd64.deb ... Unpacking libkeyutils1:amd64 (1.6-6) ... Selecting previously unselected package libkrb5support0:amd64. Preparing to unpack .../11-libkrb5support0_1.17-3_amd64.deb ... Unpacking libkrb5support0:amd64 (1.17-3) ... Selecting previously unselected package libk5crypto3:amd64. Preparing to unpack .../12-libk5crypto3_1.17-3_amd64.deb ... Unpacking libk5crypto3:amd64 (1.17-3) ... Selecting previously unselected package libkrb5-3:amd64. Preparing to unpack .../13-libkrb5-3_1.17-3_amd64.deb ... Unpacking libkrb5-3:amd64 (1.17-3) ... Selecting previously unselected package libgssapi-krb5-2:amd64. Preparing to unpack .../14-libgssapi-krb5-2_1.17-3_amd64.deb ... Unpacking libgssapi-krb5-2:amd64 (1.17-3) ... Selecting previously unselected package openssh-client. Preparing to unpack .../15-openssh-client_1%3a7.9p1-10+deb10u2_amd64.deb ... Unpacking openssh-client (1:7.9p1-10+deb10u2) ... Selecting previously unselected package libsasl2-modules-db:amd64. Preparing to unpack .../16-libsasl2-modules-db_2.1.27+dfsg-1+deb10u1_amd64.deb ... Unpacking libsasl2-modules-db:amd64 (2.1.27+dfsg-1+deb10u1) ... Selecting previously unselected package libsasl2-2:amd64. Preparing to unpack .../17-libsasl2-2_2.1.27+dfsg-1+deb10u1_amd64.deb ... Unpacking libsasl2-2:amd64 (2.1.27+dfsg-1+deb10u1) ... Selecting previously unselected package libldap-common. Preparing to unpack .../18-libldap-common_2.4.47+dfsg-3+deb10u1_all.deb ... Unpacking libldap-common (2.4.47+dfsg-3+deb10u1) ... Selecting previously unselected package libldap-2.4-2:amd64. Preparing to unpack .../19-libldap-2.4-2_2.4.47+dfsg-3+deb10u1_amd64.deb ... Unpacking libldap-2.4-2:amd64 (2.4.47+dfsg-3+deb10u1) ... Selecting previously unselected package libnghttp2-14:amd64. Preparing to unpack .../20-libnghttp2-14_1.36.0-2+deb10u1_amd64.deb ... Unpacking libnghttp2-14:amd64 (1.36.0-2+deb10u1) ... Selecting previously unselected package libpsl5:amd64. Preparing to unpack .../21-libpsl5_0.20.2-2_amd64.deb ... Unpacking libpsl5:amd64 (0.20.2-2) ... Selecting previously unselected package librtmp1:amd64. Preparing to unpack .../22-librtmp1_2.4+20151223.gitfa8646d.1-2_amd64.deb ... Unpacking librtmp1:amd64 (2.4+20151223.gitfa8646d.1-2) ... Selecting previously unselected package libssh2-1:amd64. Preparing to unpack .../23-libssh2-1_1.8.0-2.1_amd64.deb ... Unpacking libssh2-1:amd64 (1.8.0-2.1) ... Selecting previously unselected package libcurl3-gnutls:amd64. Preparing to unpack .../24-libcurl3-gnutls_7.64.0-4+deb10u1_amd64.deb ... Unpacking libcurl3-gnutls:amd64 (7.64.0-4+deb10u1) ... Selecting previously unselected package libexpat1:amd64. Preparing to unpack .../25-libexpat1_2.2.6-2+deb10u1_amd64.deb ... Unpacking libexpat1:amd64 (2.2.6-2+deb10u1) ... Selecting previously unselected package libpcre2-8-0:amd64. Preparing to unpack .../26-libpcre2-8-0_10.32-5_amd64.deb ... Unpacking libpcre2-8-0:amd64 (10.32-5) ... Selecting previously unselected package liberror-perl. Preparing to unpack .../27-liberror-perl_0.17027-2_all.deb ... Unpacking liberror-perl (0.17027-2) ... Selecting previously unselected package git-man. Preparing to unpack .../28-git-man_1%3a2.20.1-2+deb10u1_all.deb ... Unpacking git-man (1:2.20.1-2+deb10u1) ... Selecting previously unselected package git. Preparing to unpack .../29-git_1%3a2.20.1-2+deb10u1_amd64.deb ... Unpacking git (1:2.20.1-2+deb10u1) ... Selecting previously unselected package libsasl2-modules:amd64. Preparing to unpack .../30-libsasl2-modules_2.1.27+dfsg-1+deb10u1_amd64.deb ... Unpacking libsasl2-modules:amd64 (2.1.27+dfsg-1+deb10u1) ... Selecting previously unselected package libxau6:amd64. Preparing to unpack .../31-libxau6_1%3a1.0.8-1+b2_amd64.deb ... Unpacking libxau6:amd64 (1:1.0.8-1+b2) ... Selecting previously unselected package libxdmcp6:amd64. Preparing to unpack .../32-libxdmcp6_1%3a1.1.2-3_amd64.deb ... Unpacking libxdmcp6:amd64 (1:1.1.2-3) ... Selecting previously unselected package libxcb1:amd64. Preparing to unpack .../33-libxcb1_1.13.1-2_amd64.deb ... Unpacking libxcb1:amd64 (1.13.1-2) ... Selecting previously unselected package libx11-data. Preparing to unpack .../34-libx11-data_2%3a1.6.7-1_all.deb ... Unpacking libx11-data (2:1.6.7-1) ... Selecting previously unselected package libx11-6:amd64. Preparing to unpack .../35-libx11-6_2%3a1.6.7-1_amd64.deb ... Unpacking libx11-6:amd64 (2:1.6.7-1) ... Selecting previously unselected package libxext6:amd64. Preparing to unpack .../36-libxext6_2%3a1.3.3-1+b2_amd64.deb ... Unpacking libxext6:amd64 (2:1.3.3-1+b2) ... Selecting previously unselected package libxmuu1:amd64. Preparing to unpack .../37-libxmuu1_2%3a1.1.2-2+b3_amd64.deb ... Unpacking libxmuu1:amd64 (2:1.1.2-2+b3) ... Selecting previously unselected package patch. Preparing to unpack .../38-patch_2.7.6-3+deb10u1_amd64.deb ... Unpacking patch (2.7.6-3+deb10u1) ... Selecting previously unselected package publicsuffix. Preparing to unpack .../39-publicsuffix_20190415.1030-1_all.deb ... Unpacking publicsuffix (20190415.1030-1) ... Selecting previously unselected package xauth. Preparing to unpack .../40-xauth_1%3a1.0.10-1_amd64.deb ... Unpacking xauth (1:1.0.10-1) ... Setting up perl-modules-5.28 (5.28.1-6) ... Setting up libexpat1:amd64 (2.2.6-2+deb10u1) ... Setting up libxau6:amd64 (1:1.0.8-1+b2) ... Setting up libkeyutils1:amd64 (1.6-6) ... Setting up libpsl5:amd64 (0.20.2-2) ... Setting up libsasl2-modules:amd64 (2.1.27+dfsg-1+deb10u1) ... Setting up libnghttp2-14:amd64 (1.36.0-2+deb10u1) ... Setting up less (487-0.1+b1) ... Setting up krb5-locales (1.17-3) ... Setting up libldap-common (2.4.47+dfsg-3+deb10u1) ... Setting up libkrb5support0:amd64 (1.17-3) ... Setting up libsasl2-modules-db:amd64 (2.1.27+dfsg-1+deb10u1) ... Setting up libx11-data (2:1.6.7-1) ... Setting up librtmp1:amd64 (2.4+20151223.gitfa8646d.1-2) ... Setting up patch (2.7.6-3+deb10u1) ... Setting up libpcre2-8-0:amd64 (10.32-5) ... Setting up libk5crypto3:amd64 (1.17-3) ... Setting up libsasl2-2:amd64 (2.1.27+dfsg-1+deb10u1) ... Setting up git-man (1:2.20.1-2+deb10u1) ... Setting up libssh2-1:amd64 (1.8.0-2.1) ... Setting up netbase (5.6) ... Setting up libkrb5-3:amd64 (1.17-3) ... Setting up libbsd0:amd64 (0.9.1-2) ... Setting up publicsuffix (20190415.1030-1) ... Setting up libgdbm6:amd64 (1.18.1-4) ... Setting up libxdmcp6:amd64 (1:1.1.2-3) ... Setting up libxcb1:amd64 (1.13.1-2) ... Setting up libedit2:amd64 (3.1-20181209-1) ... Setting up libldap-2.4-2:amd64 (2.4.47+dfsg-3+deb10u1) ... Setting up libgssapi-krb5-2:amd64 (1.17-3) ... Setting up libgdbm-compat4:amd64 (1.18.1-4) ... Setting up libperl5.28:amd64 (5.28.1-6) ... Setting up libx11-6:amd64 (2:1.6.7-1) ... Setting up libxmuu1:amd64 (2:1.1.2-2+b3) ... Setting up openssh-client (1:7.9p1-10+deb10u2) ... Setting up libxext6:amd64 (2:1.3.3-1+b2) ... Setting up libcurl3-gnutls:amd64 (7.64.0-4+deb10u1) ... Setting up perl (5.28.1-6) ... Setting up xauth (1:1.0.10-1) ... Setting up liberror-perl (0.17027-2) ... Setting up git (1:2.20.1-2+deb10u1) ... Processing triggers for libc-bin (2.28-10) ... Removing intermediate container 4d3d195efe52 ---> 6c6376027861 Successfully built 6c6376027861 Successfully tagged openjdk:11-test ```
dathdev commented 4 years ago

I see. Thanks for the reply.