Got this error too, tried to solve it forcing uninstallation with dpkg -r --force-depends shared-mime-info and reinstallation, same error. Tried to manually remove every file/folder of this package using locate [package], tried to edit .postinst and .postrm files with exit 1 or 0 both, nothing solved the error.
Got this error too, tried to solve it forcing uninstallation with dpkg -r --force-depends shared-mime-info and reinstallation, same error. Tried to manually remove every file/folder of this package using locate [package], tried to edit .postinst and .postrm files with exit 1 or 0 both, nothing solved the error.