package avahi-dnsconfd 0.6.32~rc+dfsg-1ubuntu2 failed to install/upgrade: subprocess installed pre-removal script returned error exit status 1

Bug #1563945 reported by Jeff S
524
This bug affects 121 people
Affects Status Importance Assigned to Milestone
avahi (Ubuntu)
Fix Released
High
Unassigned

Bug Description

interesting issues while updating packages this morning...

ProblemType: Package
DistroRelease: Ubuntu 16.04
Package: avahi-dnsconfd 0.6.32~rc+dfsg-1ubuntu2
ProcVersionSignature: Ubuntu 4.4.0-16.32-generic 4.4.6
Uname: Linux 4.4.0-16-generic x86_64
NonfreeKernelModules: wl
ApportVersion: 2.20-0ubuntu3
Architecture: amd64
Date: Wed Mar 30 09:33:28 2016
DpkgTerminalLog:
 Removing avahi-discover (0.6.32~rc+dfsg-1ubuntu2) ...
 Removing avahi-dnsconfd (0.6.32~rc+dfsg-1ubuntu2) ...
 Job for avahi-daemon.socket canceled.
 dpkg: error processing package avahi-dnsconfd (--remove):
  subprocess installed pre-removal script returned error exit status 1
DuplicateSignature:
 Removing avahi-dnsconfd (0.6.32~rc+dfsg-1ubuntu2) ...
 Job for avahi-daemon.socket canceled.
 dpkg: error processing package avahi-dnsconfd (--remove):
  subprocess installed pre-removal script returned error exit status 1
ErrorMessage: subprocess installed pre-removal script returned error exit status 1
InstallationDate: Installed on 2016-01-06 (83 days ago)
InstallationMedia: Ubuntu 15.10 "Wily Werewolf" - Release amd64 (20151021)
RelatedPackageVersions:
 dpkg 1.18.4ubuntu1
 apt 1.2.9
SourcePackage: avahi
Title: package avahi-dnsconfd 0.6.32~rc+dfsg-1ubuntu2 failed to install/upgrade: subprocess installed pre-removal script returned error exit status 1
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Jeff S (jsack777) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in avahi (Ubuntu):
status: New → Confirmed
Changed in avahi (Ubuntu):
importance: Undecided → High
Revision history for this message
ernsteiswuerfel (erhard-f) wrote :

Just got hit by this bug on my PPC-system (PowerMac G5 7,3) after upgrading from 16.04 to 16.10.

Revision history for this message
David Venz (david-venz) wrote :

In my case, I installed ubuntu-mate-desktop, then xfce4, was running in xfce4 and did: (a) apt purge ubuntu-mate-desktop, (b) apt autoremove - which removed among other packages the avahi-dnsconfd package.

Revision history for this message
Richard Hiltbrunn (rhiltbrunn) wrote :

Was just doing a commandline update and as things were finishing up, this happened.

Revision history for this message
David Martinka (mainmachine) wrote :

Added "set -x" to the prerm script at /var/lib/dpkg/info/avahi-dnsconfd.prerm for more verbose console output and re-ran apt update && apt upgrade and it looks like it's failing here:

deb-systemd-invoke stop avahi-daemon.socket

```
The following packages will be upgraded:
  avahi-dnsconfd
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/14.1 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n]
(Reading database ... 459430 files and directories currently installed.)
Preparing to unpack .../avahi-dnsconfd_0.6.32~rc+dfsg-1ubuntu2.1_amd64.deb ...
+ dpkg-maintscript-helper rm_conffile /etc/default/avahi-dnsconfd 0.6.26-1~ avahi-dnsconfd -- upgrade 0.6.32~rc+dfsg-1ubuntu2.1
+ [ -d /run/systemd/system ]
+ deb-systemd-invoke stop avahi-daemon.socket
Job for avahi-daemon.socket canceled.
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg: trying script from the new package instead ...
Job for avahi-daemon.socket canceled.
dpkg: error processing archive /var/cache/apt/archives/avahi-dnsconfd_0.6.32~rc+dfsg-1ubuntu2.1_amd64.deb (--unpack):
 subprocess new pre-removal script returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/avahi-dnsconfd_0.6.32~rc+dfsg-1ubuntu2.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
```

When run manually this command fails as well:

```
$ deb-systemd-invoke stop avahi-daemon.socket
Job for avahi-daemon.socket canceled.

$ deb-systemd-invoke status avahi-daemon.socket
● avahi-daemon.socket - Avahi mDNS/DNS-SD Stack Activation Socket
   Loaded: loaded (/lib/systemd/system/avahi-daemon.socket; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2018-04-05 01:15:39 EDT; 22h ago
   Listen: /var/run/avahi-daemon/socket (Stream)

Apr 05 01:15:39 MYCOMPUTER systemd[1]: Listening on Avahi mDNS/DNS-SD Stack Activation Socket.
Apr 05 22:50:26 MYCOMPUTER systemd[1]: Listening on Avahi mDNS/DNS-SD Stack Activation Socket.
Apr 05 22:50:26 MYCOMPUTER systemd[1]: Listening on Avahi mDNS/DNS-SD Stack Activation Socket.
Apr 05 22:50:26 MYCOMPUTER systemd[1]: Listening on Avahi mDNS/DNS-SD Stack Activation Socket.
Apr 05 23:20:31 MYCOMPUTER systemd[1]: Listening on Avahi mDNS/DNS-SD Stack Activation Socket.
Apr 05 23:20:31 MYCOMPUTER systemd[1]: Listening on Avahi mDNS/DNS-SD Stack Activation Socket.
Apr 05 23:20:31 MYCOMPUTER systemd[1]: Listening on Avahi mDNS/DNS-SD Stack Activation Socket.
Apr 05 23:21:29 MYCOMPUTER systemd[1]: Listening on Avahi mDNS/DNS-SD Stack Activation Socket.
```

Revision history for this message
Dave (owensd2) wrote :

Occurred during 1st Update to the install.

Revision history for this message
Trent Lloyd (lathiat) wrote :

This seems to be some kind of weird interaction with systemd activation...

root@optane:/lib/systemd# systemctl stop avahi-daemon.socket
Job for avahi-daemon.socket canceled.

I think basically the issue is the service is immediately started again due to activation.. i'm not sure why avahi-dnsconfd is stopping it anyway though so I will check into that.

Revision history for this message
magisterludi (magisterludi) wrote :

I confirm I have the same error on update the system

Revision history for this message
carlos (candeias-m-carlos) wrote :

I had this issue before with ubuntu 16.04lts. The weird part is that it worked fine until one update that failed, i believe it was by end of 2017. unfortunately and go figure ;),had same issue with the previous version of elementaryOS, mint and now ubuntu mate.
Weirdly enough for me, with solusOS as well. i'm not a tec./linux savvy but i was always able to install different linux distros by myself but lately ... or its me that arrived at the end of my linux learning curve or i will need to replace soon my 11 year old x61s.

Ermias samuel (jemu1)
Changed in avahi (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Biquet3000 (sambuku) wrote :

Simple user who don't understand all that, I'm French and just using Ubuntu but can't resolve problem by myself. Please find an easier way to fix problems for me. Thanks...

Revision history for this message
Jeffry Johnston (ubuntu-kidsquid) wrote :

Ran into this problem today on 16.04. Here's a brute-force hack that got me past the problem. Attempt at your own risk:

# First, try to update:
sudo apt-get upgrade
# STOP if you don't see the following messages:
# Job for avahi-daemon.socket canceled.
# dpkg: warning: subprocess old pre-removal script returned error exit status 1

# Here's the hack:
sudo sed -i.backup 's:deb-systemd-invoke stop avahi-daemon.socket >/dev/null:echo:' /var/lib/dpkg/info/avahi-dnsconfd.prerm

# Try to update again
sudo apt-get upgrade
# avahi-daemon should now install without the pre-removal script error message. If it doesn't, you should restore the backup:
sudo mv /var/lib/dpkg/info/avahi-dnsconfd.prerm.backup /var/lib/dpkg/info/avahi-dnsconfd.prerm

HTH

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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