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.

7
  • 1
    Possible dupe of unix.stackexchange.com/q/121180/4671. Sep 3 '15 at 11:01
  • I don't think this is a dupe.
    – user131191
    Sep 3 '15 at 11:58
  • 2
    Unresolved dependencies are often the result of mixing different repositories and releases. It might be useful to know the content of /etc/apt/sources.list Sep 3 '15 at 12:00
  • @cryptix: Did you try to do: apt-get update && apt-get upgrade ?
    – perror
    Sep 3 '15 at 13:03
  • 1
    Does apt-get clean && apt-get update && apt-get upgrade && apt-get clean && apt-get autoremove --purge && apt-get dist-upgrade && apt-get clean && apt-get autoremove --purge complete successfully, or where does it stop, and with which error? Sep 3 '15 at 14:34
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).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy