How to fix dpkg error [2]?

I found the answer here and here.

What puzzles me is that I tried this twice before and it didn't work. It probably worked this time because I used a script I found on launchpad answers that backed up and restored what it could... I don't know. Either way, here is the fix:

  • pkexec gedit /var/lib/dpkg/status
  • Search for the offending package by name and remove its entry.
  • Save the file and exit gedit.
  • run sudo dpkg --configure -a
  • run sudo apt-get -f install just in case.
  • Continue on if there are no errors.

Tags:

Dpkg

Apt