Dpkg: unrecoverable fatal error, aborting... Ubuntu 20.04.3 LTS

Tried uninstalling and reinstalling MongoDB… I am now getting an error when installing… stating

dpkg: unrecoverable fatal error, aborting:
 unknown system user 'mongodb' in statoverride file; the system user got removed
before the override, which is most probably a packaging bug, to recover you
can remove the override manually with dpkg-statoverride
E: Sub-process /usr/bin/dpkg returned an error code (2)

I’ve tried purging everything and reinstalling again but I don’t know how to go about solving this, I also don’t want to delete any files in case thats the wrong thing to do. Any help would be appreciated, thanks!

Hey I got the same error. Is your issue solved ?

maybe don’t have mongodb user. Try adding mongodb user with command

sudo adduser mongodb

now try to proceed with the installatio