package clamav-freshclam 0.99.2+dfsg-0ubuntu0.16.04.1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1

Bug #1700040 reported by Zemajtis
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
clamav (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

no

ProblemType: Package
DistroRelease: Ubuntu 16.04
Package: clamav-freshclam 0.99.2+dfsg-0ubuntu0.16.04.1
ProcVersionSignature: Ubuntu 4.4.0-67.88-generic 4.4.49
Uname: Linux 4.4.0-67-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.5
Architecture: amd64
Date: Fri Jun 23 11:28:51 2017
DuplicateSignature:
 package:clamav-freshclam:0.99.2+dfsg-0ubuntu0.16.04.1
 Setting up clamav-freshclam (0.99.2+dfsg-0ubuntu0.16.04.1) ...
 touch: cannot touch '/var/log/clamav/freshclam.log': No such file or directory
 dpkg: error processing package clamav-freshclam (--configure):
  subprocess installed post-installation script returned error exit status 1
ErrorMessage: subprocess installed post-installation script returned error exit status 1
InstallationDate: Installed on 2017-02-22 (120 days ago)
InstallationMedia: Ubuntu 16.04 LTS "Xenial Xerus" - Release amd64 (20160420.1)
ProcCmdline: BOOT_IMAGE=/boot/vmlinuz-4.4.0-67-generic root=UUID=fe93d07c-7763-4c9b-9f52-a7e05e8920ff ro quiet splash vt.handoff=7
RelatedPackageVersions:
 dpkg 1.18.4ubuntu1.2
 apt 1.2.20
SourcePackage: clamav
Title: package clamav-freshclam 0.99.2+dfsg-0ubuntu0.16.04.1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Zemajtis (adek) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Hi Zemajtis
Thank you for taking the time to report this bug and helping to make Ubuntu better.

From the log:
touch: cannot touch '/var/log/clamav/freshclam.log': No such file or directory

Hmm the postinst for freshclam really has on line 151:
      touch "$udlogfile"
Via some indirections that is to the path
   FRESHCLAMLOGFILE=/var/log/clamav/freshclam.log

There is no related mkdir or such around so it really might fail, but I'd assume that dependencies should create the dir.
And there it is - in the postinst of clamav-base, not only would that postinst fail as it chown's the path.
  LOGDIR=/var/log/clamav
But further the package itself owns the path:

$ dpkg -L clamav-base | grep log
/var/log
/var/log/clamav

$ dpkg -S /var/log/clamav
clamav-base: /var/log/clamav

That said, clamav-freshclam which you installed depends on clamav-base so that path should exist if not e.g. manually removed.

Could you check the existence and integrity of clamav-base in your case via:
$ dpkg --verify clamav-base

Those packages should - due to the dependency - always install in the right order, but you could try to reinstall clamav-base and then check integrity again as above. After this the install/upgrade of clamav-freshclam should work.

$ apt install --reinstall clamav-base
$ dpkg --verify clamav-base
$ apt install clamav-freshclam

Since it seems likely to me that this is a local configuration problem, rather than a bug in Ubuntu, I'm marking this bug as Incomplete for now until further info was provided.

Changed in clamav (Ubuntu):
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for clamav (Ubuntu) because there has been no activity for 60 days.]

Changed in clamav (Ubuntu):
status: Incomplete → Expired
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.