ubuntu:18.04 unable to install tomcat9 due to libsystemd0 dependency problem

Bug #1988498 reported by Bennett Perkins
42
This bug affects 5 people
Affects Status Importance Assigned to Milestone
cloud-images
Fix Released
High
Tomáš Virtus

Bug Description

### Steps to reproduce

1. `docker pull docker.io/library/ubuntu:18.04`
2. `docker run --pull --rm -it docker.io/library/ubuntu:18.04 bash`
2. Inside the docker container:
    ```bash
    apt-get update
    apt-get install -y tomcat9
    ```

### Expected result

* `tomcat9` is installed successfully

### Actual result

* Installation fails with unresolvable dependencies:

```bash
root@c9849e6844d0:/# apt-get install -y tomcat9
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 tomcat9 : Depends: systemd (>= 215) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
```

Attempting to install systemd results in the following:

```bash
root@c9849e6844d0:/etc/apt# apt-get install systemd
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 systemd : Depends: libsystemd0 (= 237-3ubuntu10.53) but 237-3ubuntu10.54 is to be installed
           Recommends: libpam-systemd but it is not going to be installed
           Recommends: dbus but it is not going to be installed
           Recommends: networkd-dispatcher but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
```

### Workaround

* Installing tomcat9 works if you downgrade libsystemd:

```bash
apt-get install -y --allow-downgrades tomcat9 libsystemd0=237-3ubuntu10.53
```

### Info

* /etc/cloud/build.info: file not found in docker image
* Image digest: `sha256:138ddf6a0815d0db123be28790ef1cc5691de06fe7d9951953e2011fd0761685`
* Pulled from library/ubuntu Fri Sep 2 03:39:03 UTC 2022

description: updated
Revision history for this message
Bennett Perkins (bennettperkins) wrote :

I think this is probably a ubuntu bug, caused by a version mismatch between systemd and libsystemd0.

I've raised https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1988523

tags: added: bionic libsystemd0 systemd tomcat9
Changed in cloud-images:
status: New → Incomplete
status: Incomplete → Confirmed
Revision history for this message
Thomas Bechtold (toabctl) wrote :

The systemd version 237-3ubuntu10.54 got removed from the archive (see https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1988119 for details). We'll push a new bionic docker image soon.
As a workaround, you can still use the previous image with:

docker pull ubuntu:bionic-20220801

Changed in cloud-images:
importance: Undecided → High
assignee: nobody → Tomáš Virtus (virtustom)
Revision history for this message
Tomáš Virtus (virtustom) wrote :

New bionic image is awaiting submission into Docker Hub. In the meantime, you can use image from other registries where the fixed image was already published, e.g. public.ecr.aws/lts/ubuntu:bionic.

Revision history for this message
Bennett Perkins (bennettperkins) wrote :

Thanks for your comments Thomas and Tomáš!

I can confirm that both docker images both work as expected (ubuntu:bionic-20220801 and public.ecr.aws/lts/ubuntu:bionic), and I'm sure the new docker hub image will work too, once it lands :)

summary: - ubuntu:18.04 unable to install tomcat9
+ ubuntu:18.04 unable to install tomcat9 due to libsystemd0 dependency
+ problem
Revision history for this message
Juliano Fischer Naves (julianofischer) wrote :

I'm still facing this problem. Is there a schedule to solve it?

Revision history for this message
Tomáš Virtus (virtustom) wrote :

Image was updated. Given steps now produce expected result.

Changed in cloud-images:
status: Confirmed → Fix Released
Revision history for this message
Alex (alexander-stehlik) wrote :

It seems the latest Bionic image at Docker Hub is still broken :(

The problem does NOT occur when using

public.ecr.aws/lts/ubuntu:18.04 (Updated 8 days ago)
ubuntu:bionic-20220801 (Updated a month ago)

Builds are still failing with

ubuntu:bionic (Updated 4 days ago)
ubuntu:bionic-20220902 (Updated 4 days ago)
ubuntu:bionic-20220829 (Updated 9 days ago)

Revision history for this message
Tomáš Virtus (virtustom) wrote :

@Alex, can't reproduce. Try to run `docker pull ubuntu:bionic` first. The image was updated with same serial unfortunately, so even `ubuntu:bionic-20220902` was updated with the fix.

Revision history for this message
Tomáš Virtus (virtustom) wrote :

Correction, 20220902 is a new serial. This bug was reported against image with serial 20220829 (ubuntu:bionic-20220829). Both ubuntu:bionic and ubuntu:bionic-20220902 refer to the image with the fix.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.