1 min read

Statoverride error when upgrading Debian

Today I’m updating and upgrading all my Debian servers, but found and error saying unknown group at statoverride file. We can fix it by removing the file line  at /var/lib/dpkg/statoverride.
The error when upgrading is :

# apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
  denyhosts gnupg gpgv libmysqlclient16 mongodb-10gen mysql-common php5
  php5-apc php5-cli php5-common php5-curl php5-fpm php5-gd php5-mcrypt
  php5-mysql php5-sqlite
16 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/98.6 MB of archives.
After this operation, 112 kB disk space will be freed.
Do you want to continue [Y/n]?
dpkg: unrecoverable fatal error, aborting:
 syntax error: unknown group 'munin' in statoverride file
E: Sub-process /usr/bin/dpkg returned an error code (2)

 
The content of the /var/lib/dpkg/statoverride file is :

root munin 750 /etc/munin/plugin-conf.d
root Debian-exim 640 /etc/exim4/passwd.client
root crontab 2755 /usr/bin/crontab

So we need to remove the munin line, and after saving the file, try to upgrade the server again, and it will works 🙂