Skip to content

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

Closed
@dathdev

Description

@dathdev

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionUsability question, not directly related to an error with the image

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions