4

From the manuals:

The command why finds a dependency chain that installs the package named on the command line, as above. Note that the dependency that aptitude produced in this case is only a suggestion. This is because no package currently installed on this computer depends on or recommends the kdepim package; if a stronger dependency were available, aptitude would have displayed it.

In contrast, why-not finds a dependency chain leading to a conflict with the target package:

In my case(Ubuntu 14.04.2 LTS \n \l), I'm trying to install libdbus-1-3:i386

$ sudo apt-get install libdbus-1-3:i386
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libdbus-1-3:i386 : Depends: libc6:i386 (>= 2.10) but it is not going to be installed
 unity-control-center : Depends: libcheese-gtk23 (>= 3.4.0) but it is not going to be installed
                        Depends: libcheese7 (>= 3.0.1) but it is not going to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

I tried aptitude why and aptitude why-not, hoping to get more information about why the installation failed.

$ sudo aptitude why libdbus-1-3:i386
p   upstart:i386 Provides upstart                     
p   upstart:i386 Depends  libdbus-1-3:i386 (>= 1.2.16)

$ sudo aptitude why-not libdbus-1-3:i386
Unable to find a reason to remove libdbus-1-3:i386.

$ sudo aptitude why libc6:i386
p   sqlite3:i386 Provides sqlite3            
p   sqlite3:i386 Depends  libc6:i386 (>= 2.4)

$ sudo aptitude why-not libc6:i386
p   sqlite3:i386 Provides  sqlite3            
p   sqlite3:i386 Depends   libc6:i386 (>= 2.4)
p   libc6:i386   Conflicts libc6-xen:i386     
p   libc6:i386   Provides  libc6-xen:i386

But I can not understand the meaning of the output. Can someone please help me?

4

aptitude's why

In short, aptitude's why command try to say why a package should be installed or is installed in the system already. For example, in my system (Ubuntu 16.04) when I ran aptitude why nautilus-data, It says

i   unity-settings-daemon Depends nautilus-data (>= 2.91.3-1)

Which means unity-settings-daemon depends on nautilus-data and that's why it is installed, indicated by the i at the left most side column.

Again, when I ran aptitude why edubuntu-desktop, It says,

Unable to find a reason to install edubuntu-desktop.

Because none of my installed packages depends or recommends (depends and recommends are apt's internal term) edubuntu-desktop

aptitude's why-not

why-not is the opposite of why. It tries to find a reason why a given package should not be installed or should be removed if already installed.

For example, when I typed aptitude why-not mate-power-manager:i386, It says

i   mate-power-manager Conflicts mate-power-manager:i386

which means my installed mate-power-manager:amd64 will conflict with mate-power-manager:i386 (Because my system is a amd64 installation, that's why it didn't explicitly mention amd64).

The relevant part of the manual page is very clear. But including that will make the answer too long. Here is the aptitude's manual


About your problem

When you tried to install libdbus-1-3:i386, the messages here saying

The following packages have unmet dependencies:
 libdbus-1-3:i386 : Depends: libc6:i386 (>= 2.10) but it is not going to be installed
 unity-control-center : Depends: libcheese-gtk23 (>= 3.4.0) but it is not going to be installed
                        Depends: libcheese7 (>= 3.0.1) but it is not going to be installed

the package libdbus-1-3:i386 requires libc6:i386 (>= 2.10) but it cannot be installed. Also package unity-control-center depending on libcheese-gtk23 (>= 3.4.0) and libcheese7 (>= 3.0.1) cannot be installed.

The reason why cannot be installed can be many, including the specific version required for those packages are missing or will conflict with existing version installed etc.

Your Answer

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

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