Issue
When I run apt-get, all of a sudden I keep getting this error, I'm not able to figure out what is causing it, this is a standard Ubuntu 18.04:
# apt-get install -V apt-transport-https
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
apt-transport-https (1.6.10 => 1.6.12)
1 upgraded, 0 newly installed, 0 to remove and 244 not upgraded.
Need to get 0 B/1692 B of archives.
After this operation, 0 B of additional disk space will be used.
dpkg: unrecoverable fatal error, aborting:
invalid statoverride uid #
E: Sub-process /usr/bin/dpkg returned an error code (2)
#
Solution
This was caused by some serious filesystem corruption and I believe disk failure. The /var/lib/dpkg/statoverride file had content from a completely different file
Answered By - Roman Gaufman