0

I have a problem when installing certain software for Debian Jessie. I use apt-get install.

Sometimes it works, but in most cases I get the message:

The following packages have unsolved dependencies ... dependent on ... but ... should be installed. Problems can't be corrected. You have defect packages.

I get crazy. I have no clue how to tackle these problems. I don't need a quick fix for a certain installation but a general method or tutorial how to solve this package problem when it occurs.

perror
  • 3,239
  • 7
  • 33
  • 45

1 Answers1

1

I find the interactive mode of aptitude helpful in these situations.

It's worth reading the manual, but in short:

  1. Start aptitude with no arguments
  2. Press e to enter the resolver
  3. Look at the first solution it offers. Probably there's an action you really don't want (e.g. uninstall your favourite game) - press r to mark that action rejected. (It's a toggle, so you can undo accidental marks with the same keypress).
  4. If there's a suggested action that you think really should happen, you can toggle forcing that with a. Use this sparingly, as it can over-constrain the resolver quite easily.
  5. Press . to see the next solution, which will take into account your rejections and accepts. With luck, this will be acceptable to you; if not, then repeat from step 3.
  6. Press g to preview and g again to perform the update. Or, leave Aptitude, and the next aptitude install will apply the update (useful if you download packages automatically during off-peak times).
Toby Speight
  • 8,678