The subject line says it all. I have a condition where apt-get refuses to upgrade. How can I figure out exactly what apt-get does not like:
Here follows my example run. The reason I use a versioned install is just because otherwise apt-get just refuses to consider the upgrade. This is a problem I have gotten before and found it quite hard to figure out the reason, and is never sure if I really got the right solution. There must be a way to figure out exactly what goes wrong. First: shakti:~# dpkg --compare-versions '4:3.1.0++kl-1' '>' '4:3.1.0+rc6+kl-3'; echo "$?" 0 Ok, version 4:3.1.0++kl-1 is the greater version. Now: shakti:~# apt-get install -t unstable libkdecore4 Reading Package Lists... Done Building Dependency Tree... Done Sorry, libkdecore4 is already the newest version. Done 0 packages upgraded, 0 newly installed, 0 to remove and 58 not upgraded. Ooops. already the newest version? But what about the following, and the compare-version above: shakti:~# apt-cache show libkdecore4 | grep Version Version: 4:3.1.0++kl-1 Version: 4:3.1.0+rc6+kl-3 shakti:~# Let's try this: shakti:~# apt-get install -t unstable libkdecore4=4:3.1.0++kl-1 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. Since you only requested a single operation it is extremely likely that the package is simply not installable and a bug report against that package should be filed. The following information may help to resolve the situation: Sorry, but the following packages have unmet dependencies: libkdecore4: Depends: libdcop4 (>= 4:3.1.0++kl) but 4:3.1.0+rc6+kl-3 is to be installed Depends: libkdefx4 (>= 4:3.1.0++kl) but 4:3.1.0+rc6+kl-3 is to be installed Depends: kdeinit4 (= 4:3.1.0++kl-1) but 4:3.1.0+rc6+kl-3 is to be installed Depends: libkdecore-data but it is not going to be installed E: Sorry, broken packages Note here that all those missing packages are existing, and according to the dpkg compare-version above, have higher version numbers. apt-get is doing the wrong thing above. Why is it not updating those packages shown, libdcop4, libkdefx4 and kdeinit4, when there are newer version available that will satisfy the dependencies? the full output of the run follows in the end Karolina shakti:~# apt-get install -t unstable libkdecore4=4:3.1.0++kl-1 Reading Package Lists... Done Building Dependency Tree... Done Starting Starting 2 Investigating libkdecore4 Package libkdecore4 has broken dep on libdcop4 Considering libdcop4 2082 as a solution to libkdecore4 11796 Package libkdecore4 has broken dep on libkdefx4 Considering libkdefx4 2079 as a solution to libkdecore4 11796 Package libkdecore4 has broken dep on kdeinit4 Considering kdeinit4 1024 as a solution to libkdecore4 11796 Investigating libkdecore-data Package libkdecore-data has broken dep on libkdecore4 Considering libkdecore4 11796 as a solution to libkdecore-data 285 Removing libkdecore-data rather than change libkdecore4 Investigating kdelibs4 Package kdelibs4 has broken dep on libkdecore4 Considering libkdecore4 11796 as a solution to kdelibs4 3 Removing kdelibs4 rather than change libkdecore4 Investigating kdelibs-dev Package kdelibs-dev has broken dep on libkdecore4 Considering libkdecore4 11796 as a solution to kdelibs-dev 3 Removing kdelibs-dev rather than change libkdecore4 Investigating ksms Package ksms has broken dep on kdelibs4 Considering kdelibs4 3 as a solution to ksms 0 Removing ksms rather than change kdelibs4 Investigating kio-locate Package kio-locate has broken dep on kdelibs4 Considering kdelibs4 3 as a solution to kio-locate 0 Removing kio-locate rather than change kdelibs4 Investigating libkdegames-dev Package libkdegames-dev has broken dep on kdelibs-dev Considering kdelibs-dev 3 as a solution to libkdegames-dev 0 Removing libkdegames-dev rather than change kdelibs-dev Investigating libkscan-dev Package libkscan-dev has broken dep on kdelibs-dev Considering kdelibs-dev 3 as a solution to libkscan-dev 0 Removing libkscan-dev rather than change kdelibs-dev Investigating kickpim Package kickpim has broken dep on kdelibs4 Considering kdelibs4 3 as a solution to kickpim 0 Removing kickpim rather than change kdelibs4 Investigating koffice-dev Package koffice-dev has broken dep on kdelibs-dev Considering kdelibs-dev 3 as a solution to koffice-dev 0 Removing koffice-dev rather than change kdelibs-dev Investigating libkdecore4 Package libkdecore4 has broken dep on libdcop4 Considering libdcop4 2082 as a solution to libkdecore4 11796 Package libkdecore4 has broken dep on libkdefx4 Considering libkdefx4 2079 as a solution to libkdecore4 11796 Package libkdecore4 has broken dep on kdeinit4 Considering kdeinit4 1024 as a solution to libkdecore4 11796 Package libkdecore4 has broken dep on libkdecore-data Considering libkdecore-data 285 as a solution to libkdecore4 11796 Added libkdecore-data to the remove list Fixing libkdecore4 via keep of libkdecore-data Investigating libkdecore-data Package libkdecore-data has broken dep on libkdecore4 Considering libkdecore4 11796 as a solution to libkdecore-data 285 Removing libkdecore-data rather than change libkdecore4 Investigating libkdecore4 Package libkdecore4 has broken dep on libdcop4 Considering libdcop4 2082 as a solution to libkdecore4 11796 Package libkdecore4 has broken dep on libkdefx4 Considering libkdefx4 2079 as a solution to libkdecore4 11796 Package libkdecore4 has broken dep on kdeinit4 Considering kdeinit4 1024 as a solution to libkdecore4 11796 Package libkdecore4 has broken dep on libkdecore-data Considering libkdecore-data 285 as a solution to libkdecore4 11796 Added libkdecore-data to the remove list Fixing libkdecore4 via keep of libkdecore-data Investigating libkdecore-data Package libkdecore-data has broken dep on libkdecore4 Considering libkdecore4 11796 as a solution to libkdecore-data 11796 Removing libkdecore-data rather than change libkdecore4 Investigating libkdecore4 Package libkdecore4 has broken dep on libdcop4 Considering libdcop4 2082 as a solution to libkdecore4 11796 Package libkdecore4 has broken dep on libkdefx4 Considering libkdefx4 2079 as a solution to libkdecore4 11796 Package libkdecore4 has broken dep on kdeinit4 Considering kdeinit4 1024 as a solution to libkdecore4 11796 Package libkdecore4 has broken dep on libkdecore-data Considering libkdecore-data 11796 as a solution to libkdecore4 11796 Considering libkdecore-data 11796 as a solution to libkdecore4 11796 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. Since you only requested a single operation it is extremely likely that the package is simply not installable and a bug report against that package should be filed. The following information may help to resolve the situation: Sorry, but the following packages have unmet dependencies: libkdecore4: Depends: libdcop4 (>= 4:3.1.0++kl) but 4:3.1.0+rc6+kl-3 is to be installed Depends: libkdefx4 (>= 4:3.1.0++kl) but 4:3.1.0+rc6+kl-3 is to be installed Depends: kdeinit4 (= 4:3.1.0++kl-1) but 4:3.1.0+rc6+kl-3 is to be installed Depends: libkdecore-data but it is not going to be installed E: Sorry, broken packages shakti:~#