Saturday, May 18, 2024
 Popular · Latest · Hot · Upcoming
80
rated 0 times [  80] [ 0]  / answers: 1 / hits: 84517  / 3 Years ago, fri, june 25, 2021, 7:52:52

I had an application installed on my htpc running ubuntu server called mediatomb, a few months ago I uninstalled it and replaced it with a Plex install. At the weekend when querying existing users on the machine I noticed that the mediatomb user and group still existed so I used the command



sudo deluser mediatomb


to remove the user. A day or so later I went to install htop sudo apt-get install htop but I found that I was getting an error:



syntax error: unknown user 'mediatomb' in statoverride file.



I thought I would just be able to open the statoverride file using nano and edit out any references to mediatomb but I wasn't able to open the file correctly using nano. I ran a grep command



grep 'mediatomb' /var/lib/dpkg/statoverride



which returned two locations in the file which don't exist on the system anymore. The only way I am able to get around the issue for now is to re-create the user mediatomb and then everything works fine. Obviously this isn't a good long-term solution.



What I would like to know is, what is the statoverride file and why does it retain users in it which have been removed from the system? Am I removing the users in the wrong or deprecated way?


More From » dpkg

 Answers
4

I know this question is a little old, but have come across this twice now. Once with puppet, once with virtualbox. It cropped up again and I found something that worked. It's a variation on serverfault.com.



Instead of relying on dpkg-statoverride --remove /path/to/offending/file.ext which, throws the error



dpkg: unrecoverable fatal error, aborting:
syntax error: unknown group offendinggroup in statoverride file


You can get fancy with sed, or you can simply open /var/lib/dpkg/statoverride in your favorite text editor and remove only the lines containing the item(s) that were causing the error. I found that this is a documented bug, for both Debian, and Ubuntu,





That said, I just fixed mine by manually editing out any entry that threw an error, and I am happily downloading packages again. Hope this helps the next person, who visits this number 1 Google search result for this problem.


[#29839] Saturday, June 26, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
afyess

Total Points: 437
Total Questions: 120
Total Answers: 107

Location: San Marino
Member since Fri, Jul 3, 2020
4 Years ago
afyess questions
;