Failed to Install pcp Noninteractively

Bug #2064784 reported by Hao Chen
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
pcp (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Ubuntu version: I use the docker images ubuntu:24.04, the image hash is fabf3a8d4949

```
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=24.04
DISTRIB_CODENAME=noble
DISTRIB_DESCRIPTION="Ubuntu 24.04 LTS"
```

Package version: pcp 6.2.0-1.1build4

What I expect: Being able to install it noninteractively

What happened: failed when setting up the package.

Simplest Reproduction:

```
$ docker run --rm -it ubuntu:24.04 bash
# apt-get -y update; \
DEBIAN_FRONTEND=noninteractive apt-get -y install sudo; \
sudo DEBIAN_FRONTEND=noninteractive apt-get -y install software-properties-common # <== This is important. Cannot reproduce without this.
# sudo DEBIAN_FRONTEND=noninteractive apt-get -y install pcp
...
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
dpkg: error processing package pcp (--configure):
 installed pcp package post-installation script subprocess returned error exit status 1
Processing triggers for libc-bin (2.39-0ubuntu8.1) ...
Errors were encountered while processing:
 pcp
E: Sub-process /usr/bin/dpkg returned an error code (1)
```

Note that if I skipped `software-properties-common` then there are no failures.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in pcp (Ubuntu):
status: New → Confirmed
Revision history for this message
Thomas Aglassinger (roskakori) wrote (last edit ):

It seems the issue is related to the pcp package, which fails to install even when attempted after the upgrade.

```
$ sudo apt install -y cockpit
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
cockpit is already the newest version (314-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up pcp (6.2.0-1.1build4) ...
Job for pmlogger.service failed because the service did not take the steps required by its unit configuration.
See "systemctl status pmlogger.service" and "journalctl -xeu pmlogger.service" for details.
dpkg: error processing package pcp (--configure):
 installed pcp package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of cockpit-pcp:
 cockpit-pcp depends on pcp; however:
  Package pcp is not configured yet.

dpkg: error processing package cockpit-pcp (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          Errors were encountered while processing:
 pcp
 cockpit-pcp
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)
```

Revision history for this message
Thomas Aglassinger (roskakori) wrote (last edit ):

I managed to git rid of cockpit using the following commands:

```
sudo apt --fix-broken install
sudo apt-get remove -y cockpit cockpit-pcp pcp
sudo apt autoremove -y
```

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.