[Bug 1570310] Re: package systemd 229-4ubuntu4 failed to install/upgrade: subprocess installed pre-removal script returned error exit status 2
John McPherson
1570310 at bugs.launchpad.net
Thu Mar 2 19:57:05 UTC 2017
I have encountered this occasionally over several years, and have just
had it happen on an install of Ubuntu 16.10 (clean install of 16.10, not
upgraded from an earlier version).
The postinst script for systemd does
addgroup --system systemd-journal
This gives the error
addgroup: The group `systemd-journal' already exists and is not a system group. Exiting.
and package install fails.
$ dpkg -l systemd
||/ Name Version Architecture Description
+++-==============-============-============-=================================
iF systemd 231-9ubuntu3 amd64 system and service manager
The problem is that addgroup will return 0 for --system if the group
exists and the gid is between FIRST_SYSTEM_GID and LAST_SYSTEM_GID, but
these are not set in the default /etc/adduser.conf file, so 'addgroup
--system systemd-journal' returns 1 instead:
# addgroup --system systemd-journal
addgroup: The group `systemd-journal' already exists and is not a system group. Exiting.
# echo $?
1
# echo 'FIRST_SYSTEM_GID=50' >> /etc/adduser.conf
# echo 'LAST_SYSTEM_GID=300' >> /etc/adduser.conf
# addgroup --system systemd-journal
addgroup: The group `systemd-journal' already exists as a system group. Exiting.
# echo $?
0
The postinst script should be modified to either test if the group already exists (and not rely on addgroup to do it silently), or do "addgroup --system systemd-journal || true" to ignore errors from addgroup.
** Changed in: systemd (Ubuntu)
Status: Expired => Confirmed
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/1570310
Title:
package systemd 229-4ubuntu4 failed to install/upgrade: subprocess
installed pre-removal script returned error exit status 2
Status in systemd package in Ubuntu:
Confirmed
Bug description:
I was upgrading from 15.10 to 16.04 when this error occur.
ProblemType: Package
DistroRelease: Ubuntu 16.04
Package: systemd 229-4ubuntu4
ProcVersionSignature: Ubuntu 4.4.0-18.34-generic 4.4.6
Uname: Linux 4.4.0-18-generic x86_64
ApportVersion: 2.20.1-0ubuntu1
Architecture: amd64
Date: Wed Apr 13 21:41:53 2016
DpkgTerminalLog:
Preparing to unpack .../systemd_229-4ubuntu4_amd64.deb ...
De-configuring udev (225-1ubuntu9.1) ...
dpkg: error processing archive /var/cache/apt/archives/systemd_229-4ubuntu4_amd64.deb (--unpack):
subprocess installed pre-removal script returned error exit status 2
DuplicateSignature:
De-configuring udev (225-1ubuntu9.1) ...
dpkg: error processing archive /var/cache/apt/archives/systemd_229-4ubuntu4_amd64.deb (--unpack):
subprocess installed pre-removal script returned error exit status 2
ErrorMessage: subprocess installed pre-removal script returned error exit status 2
InstallationDate: Installed on 2016-01-08 (96 days ago)
InstallationMedia: Ubuntu 15.04 "Vivid Vervet" - Release amd64 (20150422)
Lsusb:
Bus 002 Device 002: ID 0781:5583 SanDisk Corp.
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 04f2:b483 Chicony Electronics Co., Ltd
Bus 001 Device 002: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
MachineType: ASUSTeK COMPUTER INC. X455LJ
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.4.0-18-generic root=UUID=70fa96eb-e0d8-4e65-b049-9cb150759b40 ro quiet splash vt.handoff=7
RelatedPackageVersions:
dpkg 1.18.4ubuntu1
apt 1.2.10
SourcePackage: systemd
SystemdDelta:
[EXTENDED] /etc/systemd/system/display-manager.service → /lib/systemd/system/display-manager.service.d/xdiagnose.conf
[EXTENDED] /lib/systemd/system/rc-local.service → /lib/systemd/system/rc-local.service.d/debian.conf
[EXTENDED] /lib/systemd/system/systemd-timesyncd.service → /lib/systemd/system/systemd-timesyncd.service.d/disable-with-time-daemon.conf
3 overridden configuration files found.
Title: package systemd 229-4ubuntu4 failed to install/upgrade: subprocess installed pre-removal script returned error exit status 2
UpgradeStatus: Upgraded to xenial on 2016-04-13 (0 days ago)
dmi.bios.date: 04/22/2015
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: X455LJ.203
dmi.board.asset.tag: ATN12345678901234567
dmi.board.name: X455LJ
dmi.board.vendor: ASUSTeK COMPUTER INC.
dmi.board.version: 1.0
dmi.chassis.asset.tag: ATN12345678901234567
dmi.chassis.type: 10
dmi.chassis.vendor: ASUSTeK COMPUTER INC.
dmi.chassis.version: 1.0
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvrX455LJ.203:bd04/22/2015:svnASUSTeKCOMPUTERINC.:pnX455LJ:pvr1.0:rvnASUSTeKCOMPUTERINC.:rnX455LJ:rvr1.0:cvnASUSTeKCOMPUTERINC.:ct10:cvr1.0:
dmi.product.name: X455LJ
dmi.product.version: 1.0
dmi.sys.vendor: ASUSTeK COMPUTER INC.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1570310/+subscriptions
More information about the foundations-bugs
mailing list