Re: debugging package breakage



On Thu, Aug 18, 2011 at 11:20:43PM -0400, Tom Roche wrote:

summary: I'm a new debian user with some package breakage. I'd appreciate

* assistance with my specific problem (i.e., give me a fish)
* general heuristics for debug package breakage (i.e., teach me to fish)

[cut]

So I'm confused. Why does `aptitude` think these packages are broken? If
it's wrong (i.e., the packages are not broken), how do I correct its
misperception? If it's correct, how do I fix the packages, if `aptitude`
won't force install?

The main reason you've got package breakage is usually because upgrading
them would conflict with some other package you have. Speaking purely
from a personal perspective here, I've learned to get along very well
with the curses interface to aptitude.

Start by running "aptitude" as root (i.e. by su to root or by sudo as is
your wont). There'll be a few seconds while aptitude does some
calculations, then you get a "graphical" interface. At the top is a
blue menu, next is a tree view of all the packages known to the system,
another blue bar then heads a description pane and at the bottom is the
status bar. Likely, in your situation the status bar is red. You will
also see, at the top of the screen something like "Broken: #N"

What we now do is press 'e' to 'E'xamine aptitude's suggestions on how
to resolve these breakages. Aptitude will present you with a list of
packages sorted by what it plans to do with them. For example, you'll
get "Remove the following packages:", "Keep the following packages at
their current version:" and so on.

You now have two options to pick a suitable resolution. The simple
method is to use the '.' and ',' (mnemonic, they're the '>' and '<'
keys, usually, but without shift) to cycle through aptitude's solutions
until you find one that's suitable to you. Pay attention to each
solution as it's presented as there may be some solutions you'd not
thought of: the simplest solution is to hold every broken package back
and hope that an update will fix it in a few days (happens a lot in
unstable), or you may find that a package has been replaced by another
of similar functionality (for example dhcp-client and isc-dhcp-client)
or, if you have a particularly complicated set of sources, you may even
have to downgrade a package to achieve solution.

The more advanced method is to guide aptitude's resolver. Each time
aptitude presents you with a solution, "vote" on whether you approve of
or reject the solution for individual packages. For example, you say you
want samba, so if aptitude wants to remove the samba package, scroll
down to it and press 'r' to reject that suggestion. If aptitude wants
to, say, upgrade a package but you don't like the whole of the solution,
press 'a' on that package to approve it. Use this sparingly; although
you're guiding aptitude, you're also restricting it.

Finally, when you get to a solution you're happy with, press '!" to
apply the solution. You'll be take back to the package list and,
hopefully, the "Broken: #N" message should be gone. Press 'g' to get a
preview of the changes to be made and finally 'g' to actually
download/install the packages.


Feel free to forward or to point me to FM to RT,
and TIA, Tom Roche <Tom_Roche@xxxxxxxxx>


--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx
Archive: http://lists.debian.org/87d3g2xf1w.fsf@xxxxxxxxx


--
Darac Marjal

Attachment: signature.asc
Description: Digital signature



Relevant Pages

  • Re: dselect and a Recent Experience
    ... > done while installing a single package. ... > Debian system and I used dselect to list the packages in order to find ... It found it and I started to install from there except I ... problems and thought I'd try aptitude. ...
    (Debian-User)
  • Re: aptitude trap: hold directives not honored.
    ... problem is that aptitude ignores the status file. ... Or are you saying that dpkg is what's broken? ... The package description for dpkg ... consistently betweeen the two interfaces it supports. ...
    (Debian-User)
  • Re: Question about how "aptitude search" is used
    ... searches both package names and descriptions. ... about changing the default behavior on bare strings. ... while the benefit of having "aptitude search" produce more useful ... enough wide strings in memory to cause this sort of behavior, ...
    (Debian-User)
  • Re: Is apt-get still the cool package installer?
    ... software install tool that doesn't require a mouse, ... the interactive resolver for aptitude probably won't be rolled into ... apt-get and it may be the best way to deal with complex dependency issues. ... "Note that aptitude is the preferred program for package management ...
    (Debian-User)
  • Re: Aptitude issue
    ... I was able to do a aptitude update && aptitude full-upgrade. ... Reading package lists... ... Reading state information... ... Writing extended state information... ...
    (Debian-User)