I've been doing the usual routine of saving the package selections and also marking the packages as auto or manual as outlined in the question and answer here: Restoring all data from backup of dpkg --set-selections '*'.

Now when I try to run apt-get -u dselect-upgrade I get:

# apt-get -u dselect-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages have unmet dependencies:
 cron : Depends: adduser but it is not going to be installed
 upstart : Depends: initscripts
           Depends: mountall
           Depends: ifupdown (>= 0.6.10ubuntu5)
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Internal error, problem resolver broke stuff

The alternative aptitude install doesn't give me anything at all:

# aptitude install
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.

So when I check whether cron and adduser are installed, they of course are:

# dpkg -l|grep -E '(adduser|cron)'
ii  adduser                           3.113ubuntu2                 add and remove users and groups
ii  cron                              3.0pl1-120ubuntu4            process scheduling daemon

So two questions: what's going on and how do I resolve it?

NB: the package selections were taken from another 12.04 installation, same architecture and everything. In fact it's a system that ran on the same machine before reinstalling on a different disk. This is the first time I run into this kind of problems when cloning an existing setup by means of package states and then copying over relevant contents from the original /etc.

For the second set of allegedly unmet dependencies I get:

# dpkg -l|grep -E '(upstart|initscripts|mountall|ifupdown)'
ii  ifupdown                          0.7~beta2ubuntu8             high level tools to configure network interfaces
ii  initscripts                       2.88dsf-13.10ubuntu11.1      scripts for initializing and shutting down the system
ii  mountall                          2.36.4                       filesystem mounting tool
ii  upstart                           1.5-0ubuntu7.2               event-based init daemon

So all installed.

No held packages either. Output of aptitude search ~i|grep ^ih is empty.

The system in question is a Ubuntu Server 12.04.2 installation, otherwise upgraded to latest packages. No third-party repositories configured, no package pinning or so going on.

btw: I would appreciate if the answer would include some pointers about what to do generally when hitting such an issue without relying in the subtly different problem resolvers in the various dpkg front ends. Most suggestions I've come across seem to rely solely on that and that's why I'm out of luck now. So I need to know some of the nitty gritty, too.

closed as unclear what you're asking by Braiam, jimmij, slm Oct 27 '14 at 16:01

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    This is a bit late, but the first thing you should do when run into "can't be installed" messages is to run apt-cache policy on all the packages that appear in the error message, and then post them in the answer. – Faheem Mitha Nov 29 '13 at 22:04

Try doing the following:

   packages=`cat installed-software | grep -v deinstall | cut -f1`
   sudo apt-get install $packages
  • 2
    There's a Useless Use of Cat here. Beware. You should probably do something like grep -v deinstall installed-software | cut -f 1. – rahmu Aug 24 '13 at 23:10

Not the answer you're looking for? Browse other questions tagged or ask your own question.