Q:

Serious dpkg problems

'E: Sub-process /usr/bin/dpkg returned an error code (1)'
From this post http://ubuntuforums.org/showthread.php?t=1642173
dpkg: error processing package unity (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 gconf2
 compiz-gnome
 update-notifier-common
 aisleriot
 compiz
 apturl
 nautilus-share
 libreoffice-gnome
 transmission-gtk
 update-notifier
 gnome-terminal-data
 ubuntu-desktop
 update-manager
 ubuntu-release-upgrader-gtk
 gnome-terminal
 unity
dpkg: error processing package ubuntu-desktop (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of update-manager:
 update-manager depends on update-notifier; however:
  Package update-notifier is not configured yet.

dpkg: error processing package update-manager (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of ubuntu-release-upgrader-gtk:
 ubuntu-release-upgrader-gtk depends on update-manager; however:
  Package update-manager is not configured yet.

dpkg: error processing package ubuntu-release-upgrader-gtk (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of gnome-terminal:
 gnome-terminal depends on gnome-terminal-data (>= 3.6); however:
  Package gnome-terminal-data is not configured yet.
 gnome-terminal depends on gnome-terminal-data (<< 3.7); however:
  Package gnome-terminal-data is not configured yet.

dpkg: error processing package gnome-terminal (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of unity:
 unity depends on compiz; however:
  Package compiz is not configured yet.

and the list goes on through each package I am missing. Should I dpkg-reconfigure -a ?
citation:What does apt-get --fix-missing do and when is it useful?
I have tried sudo apt-get install --fix missing but I return with the original error message at the beginning of this post.

A:

I had this error after upgrading from 14.04 to 14.10. After hours researching found the command that saved the day:
$ sudo aptitude install --safe-resolver

From the man page:

--safe-resolver
When package dependency problems are encountered, use a “safe” algorithm to solve them. This resolver attempts to preserve as many of your choices as possible; it will never remove a package or install a version of a package other than the package's default candidate version. It is the same algorithm used in safe-upgrade; indeed, aptitude --safe-resolver full-upgrade is equivalent to aptitude safe-upgrade. Because safe-upgrade always uses the safe resolver, it does not accept the --safe-resolver flag.
This option is equivalent to setting the configuration variable Aptitude::Always-Use-Safe-Resolver to true.

