Ubuntu – Apt/Synaptic needs to reinstall package but can’t find the archive for it


Running Synaptic I get the following error message:

E: The package hl1440lpr needs to be reinstalled, but I can't find an archive for it.
E: Internal error opening cache (1). Please report.

Upon accepting the message, Synaptic quits.

Best Answer

Well we may need a few steps to fix this.

  1. Start with:

    sudo dpkg --remove --force-all hl1440lpr
  2. If that fails:

    sudo rm -i /var/lib/dpkg/info/hl1440lpr.*
    sudo dpkg --remove --force-remove-reinstreq hl1440lpr
  3. Confirm Apt is fixed. The following command should return no errors:

    sudo apt-get update