Server running Ubuntu 12.04 lts
I installed munin the other day on a server. I decided later to remove it with apt-get.
I noticed that not everything was removed from the installation so manually removed the munin web directory and also removed the munin user-name and group from the sever.
However I have just now tried to run apt-get upgrade which is now returning an error:
dpkg: unrecoverable fatal error, aborting: syntax error: unknown user 'munin' in statoverride file E: Sub-process /usr/bin/dpkg returned an error code (2)
I am now out of my depth. What does this mean? Google results have not really been helpful.
Can anyone help?
Thanks, John
Take a look in
if there is any line
Try:
Don't do that! Because you didn't purged properly the users stored in
/etc/passwd
file, which dpkg queries to compare with the statoverride file, do not match up and dpkg is throwing a warning. Instead purge the package and dpkg will remove all the directories and users the package created, without the user having to dirt their hands in it.This should do it.
I was trying to reinstall apache2 cause for some reason which I could not fix, it refused to start
$ sudo apt-get install apache2 dpkg: unrecoverable fatal error, aborting: syntax error:
unknown group 'nagios'
in statoverride file
Looking into:
dpkg/statoverride
cat /var/lib/dpkg/statoverride root postdrop 2555 /usr/sbin/postdrop root postdrop 2555 /usr/sbin/postqueue root mlocate 2755 /usr/bin/mlocate postfix postdrop 2710 /var/spool/postfix/public
root nagios 4750 /check_icmp
root ssl-cert 710 /etc/ssl/private root crontab 2755 /usr/bin/crontab
The solution was to:
:/etc/php5/apache2/conf.d$ sudo sed -i '/nagios/d' /var/lib/dpkg/statoverride
And the result
:/etc/php5/apache2/conf.d$ cat /var/lib/dpkg/statoverride root postdrop 2555 /usr/sbin/postdrop root postdrop 2555 /usr/sbin/postqueue root mlocate 2755 /usr/bin/mlocate postfix postdrop 2710 /var/spool/postfix/public root ssl-cert 710 /etc/ssl/private root crontab 2755 /usr/bin/crontab
credit: Ubuntu unknown user in statoverride