Score:1

How can I correct Dependency Evaluation Failure in apt/dpkg installations/upgrades?

us flag

I recently upgraded from Xenial to Fossa, and the entire process appeared to go swimmingly. I have no .list files that reference Xenial on my system, and Fossa appears to be working as intended.

Today, I found that I had an upgradable package, ubuntu-advantage-tools, but it won't install because it depends on distro-info that's not going to be installed. In trying to find out why, it seems that distro-info depends on distro-info-data which ... is not going to be installed. The reason for this is that the distro-info-data package I have is already the newest version, presumably a result of my recent OS upgrade. And this makes sense, as my OS is working correctly in all respects: obviously the distro-info-data package I have (version 0.46+18.04.sav0) is satisfactory, and the x.yy numeric versioning value is higher than the indicated dependency for distro-info (0.39) and the most recent published version from April (0.43).

[Wed Jul 14-12:42:17]-[exit:100]-$> sudo apt install ubuntu-advantage-tools
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:
 ubuntu-advantage-tools : Depends: distro-info but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

[Wed Jul 14-12:42:29]-[exit:100]-$> sudo apt install distro-info
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:
 distro-info : Depends: distro-info-data (>= 0.39ubuntu1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

[Wed Jul 14-12:42:40]-[exit:100]-$> sudo apt install distro-info-data
Reading package lists... Done
Building dependency tree
Reading state information... Done
distro-info-data is already the newest version (0.46+18.04.sav0).
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.

So, the question is this: why is the dependency-evaluation process not recognizing distro-info-data (0.46+18.04.sav0) as satisfying the declared dependency for distro-info of distro-info-data (>= 0.39ubuntu1) despite the fact that it clearly actually does?

Also, what can I do to fix this that will permit future non-manual upgrades to be installed without issues while avoiding what amounts to total re-installation of my OS (which is essentially what was indicated when I investigated the replacement of my most recent distro-info-data (0.46+18.04.sav0) with distro-info-data (0.43ubuntu1.5_all))?

Additional reference:

[Wed Jul 14-13:37:33]-[exit:0]-$> sudo apt show distro-info
Package: distro-info
Version: 0.23ubuntu1
Priority: optional
Section: devel
Origin: Ubuntu
Maintainer: Ubuntu Developers <[email protected]>
Original-Maintainer: Benjamin Drung <[email protected]>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 69.6 kB
Depends: distro-info-data (>= 0.39ubuntu1), libc6 (>= 2.7)
Suggests: shunit2 (>= 2.1.6)
Breaks: ubuntu-dev-tools (<< 0.133~)
Replaces: ubuntu-dev-tools (<< 0.127~)
Download-Size: 17.1 kB
APT-Sources: http://us.archive.ubuntu.com/ubuntu focal/main amd64 Packages
Description: provides information about the distributions' releases
 Information about all releases of Debian and Ubuntu. The distro-info script
 will give you the codename for e.g. the latest stable release of your
 distribution. To get information about a specific distribution there are the
 debian-distro-info and the ubuntu-distro-info scripts.

[Wed Jul 14-13:39:22]-[exit:0]-$> sudo apt show distro-info-data
Package: distro-info-data
Version: 0.46+18.04.sav0
Status: install ok installed
Priority: important
Section: devel
Maintainer: Benjamin Drung <[email protected]>
Installed-Size: 18.4 kB
Breaks: distro-info (<< 1.0~)
Download-Size: unknown
APT-Manual-Installed: yes
APT-Sources: /var/lib/dpkg/status
Description: information about the distributions' releases (data files)
 Information about all releases of Debian and Ubuntu. The distro-info script
 will give you the codename for e.g. the latest stable release of your
 distribution. To get information about a specific distribution there are the
 debian-distro-info and the ubuntu-distro-info scripts.
 .
 This package contains the data files.

N: There are 2 additional records. Please use the '-a' switch to see them.
[Wed Jul 14-13:48:18]-[exit:0]-$> apt-cache policy distro-info-data distro-info
distro-info-data:
  Installed: 0.46+18.04.sav0
  Candidate: 0.46+18.04.sav0
  Version table:
 *** 0.46+18.04.sav0 100
        100 /var/lib/dpkg/status
     0.43ubuntu1.5 500
        500 http://us.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
        500 http://us.archive.ubuntu.com/ubuntu focal-updates/main i386 Packages
        500 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu focal-security/main i386 Packages
     0.43ubuntu1 500
        500 http://us.archive.ubuntu.com/ubuntu focal/main amd64 Packages
        500 http://us.archive.ubuntu.com/ubuntu focal/main i386 Packages
distro-info:
  Installed: (none)
  Candidate: 0.23ubuntu1
  Version table:
     0.23ubuntu1 500
        500 http://us.archive.ubuntu.com/ubuntu focal/main amd64 Packages
[Wed Jul 14-14:15:46]-[exit:1]-$> dpkg -l | grep sav
ii  distro-info-data                                            0.46+18.04.sav0                                 all          information about the distributions' releases (data files)
ii  glslang-tools                                               8.13.3763-0ubuntu1~18.04.sav0                   amd64        OpenGL and OpenGL ES shader front end and validator -- tools
ii  gnome-screensaver                                           3.6.1-11ubuntu4                                 amd64        Screensaver and screen lock formerly used in GNOME
ii  logsave                                                     1.45.5-2ubuntu1                                 amd64        save the output of a command in a log file
ii  meson                                                       0.55.1-1~18.04.sav0                             all          high-productivity build system
ii  ninja-build                                                 1.10.2-0ubuntu1~18.04.sav0                      amd64        small build system closest in spirit to Make
ii  python3-distro-info                                         1.0+18.04sav0                                   all          information about distributions' releases (Python 3 module)
ii  spirv-tools                                                 2020.4-1~18.04.sav0                             amd64        API and commands for processing SPIR-V modules
ii  tzdata                                                      2021a-0ubuntu0.20.04                            all          time zone and daylight-saving time data
ii  x11proto-scrnsaver-dev                                      2019.2-1ubuntu1                                 all          transitional dummy package
ii  xscreensaver                                                5.42+dfsg1-1ubuntu1                             amd64        Screensaver daemon and frontend for X11
ii  xscreensaver-data                                           5.42+dfsg1-1ubuntu1                             amd64        Screen saver modules for screensaver frontends
ii  xscreensaver-data-extra                                     5.42+dfsg1-1ubuntu1                             amd64        Extra screen saver modules for screensaver frontends
ii  xscreensaver-gl                                             5.42+dfsg1-1ubuntu1                             amd64        GL(Mesa) screen saver modules for screensaver frontends
ii  xscreensaver-gl-extra                                       5.42+dfsg1-1ubuntu1                             amd64        Extra GL(Mesa) screen saver modules for screensaver frontends
[Wed Jul 14-14:17:48]-[exit:0]-$> aptitude search ~o
i   amdvlk                                                                                                                               - AMD Open Source Driver for Vulkan                                                                                                              
i   darling                                                                                                                              - Darling                                                                                                                                        
i   darling-dkms                                                                                                                         - Kernel module for Darling                                                                                                                      
i   discord                                                                                                                              - Chat for Communities and Friends                                                                                                               
i A gstreamer1.0-fluendo-mp3                                                                                                             - Fluendo mp3 decoder GStreamer 1.0 plugin                                                                                                       
i A libnih1                                                                                                                              - NIH Utility Library                                                                                                                            
i A libprocps6                                                                                                                           - library for accessing process information from /proc                                                                                           
i A libssl1.0.0                                                                                                                          - Secure Sockets Layer toolkit - shared libraries                                                                                                
i   nomachine                                                                                                                            - Fast and secure remote access system                                                                                                           
i A perl-modules-5.26                                                                                                                    - Core Perl modules                                                                                                                              
i   python-iniparse                                                                                                                      - access and modify configuration data in INI files (Python 2)                                                                                   
i   python3.8.1-dev-dosk                                                                                                                 - python3.8.1-dev                                                                                                                                
i   sc-controller                                                                                                                        - User-mode driver and GTK3 based GUI for Steam Controller                                                                                       
i   tokentool                                                                                                                            - TokenTool                                                                                                                                      
i A ureadahead                                                                                                                           - Read required files in advance

Note: removal of the existing distro-info-data=0.46+18.04.sav0 package is identified by Synaptic Package Manager as having the certain cascading results: also-impacted

[Wed Jul 14-14:17:54]-[exit:0]-$> grep -r "deb\ " /etc/apt/ --include=*.list
/etc/apt/sources.list:# deb cdrom:[Ubuntu 18.04.3 LTS _Bionic Beaver_ - Release amd64 (20190805)]/ bionic main restricted
/etc/apt/sources.list:deb http://us.archive.ubuntu.com/ubuntu/ focal main restricted
/etc/apt/sources.list:deb http://us.archive.ubuntu.com/ubuntu/ focal-updates main restricted
/etc/apt/sources.list:deb http://us.archive.ubuntu.com/ubuntu/ focal universe
/etc/apt/sources.list:deb http://us.archive.ubuntu.com/ubuntu/ focal-updates universe
/etc/apt/sources.list:deb http://us.archive.ubuntu.com/ubuntu/ focal multiverse
/etc/apt/sources.list:deb http://us.archive.ubuntu.com/ubuntu/ focal-updates multiverse
/etc/apt/sources.list:deb http://us.archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
/etc/apt/sources.list:# deb http://archive.canonical.com/ubuntu bionic partner
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu focal-security main restricted
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu focal-security universe
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu focal-security multiverse
/etc/apt/sources.list:deb https://dl.winehq.org/wine-builds/ubuntu/ focal main
/etc/apt/sources.list:# deb https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/xUbuntu_18.04/ ./
/etc/apt/sources.list.d/wine-obs.list:# deb http://download.opensuse.org/repositories/Emulators:/Wine:/Debian/xUbuntu_18.04 ./
/etc/apt/sources.list.d/teamviewer.list:deb https://linux.teamviewer.com/deb stable main
/etc/apt/sources.list.d/teamviewer.list:# deb https://linux.teamviewer.com/deb preview main
/etc/apt/sources.list.d/teamviewer.list:# deb https://linux.teamviewer.com/deb development main
/etc/apt/sources.list.d/lutris-team-ubuntu-lutris-bionic.list:deb http://ppa.launchpad.net/lutris-team/lutris/ubuntu focal main
/etc/apt/sources.list.d/microsoft-prod.list:deb [arch=amd64] https://packages.microsoft.com/ubuntu/20.04/prod focal main
/etc/apt/sources.list.d/amdvlk.list:# deb [arch=amd64,i386] http://repo.radeon.com/amdvlk/apt/debian/ bionic main
/etc/apt/sources.list.d/pcsx2-team-ubuntu-pcsx2-daily-bionic.list:deb http://ppa.launchpad.net/pcsx2-team/pcsx2-daily/ubuntu focal main
/etc/apt/sources.list.d/appimagelauncher-team-ubuntu-stable-focal.list:deb http://ppa.launchpad.net/appimagelauncher-team/stable/ubuntu focal main
/etc/apt/sources.list.d/dlech-ubuntu-keepass2-plugins-bionic.list:deb http://ppa.launchpad.net/dlech/keepass2-plugins/ubuntu focal main
/etc/apt/sources.list.d/google-chrome.list:deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main
/etc/apt/sources.list.d/solaar-unifying-ubuntu-stable-bionic.list:deb http://ppa.launchpad.net/solaar-unifying/stable/ubuntu focal main
/etc/apt/sources.list.d/libratbag-piper-ubuntu-piper-libratbag-git-bionic.list:deb http://ppa.launchpad.net/libratbag-piper/piper-libratbag-git/ubuntu focal main
/etc/apt/sources.list.d/home:kozec.list:# deb http://download.opensuse.org/repositories/home:/kozec/xUbuntu_18.04/ /
/etc/apt/sources.list.d/dlech-ubuntu-keepass2-plugins-beta-focal.list:# deb http://ppa.launchpad.net/dlech/keepass2-plugins-beta/ubuntu focal main
/etc/apt/sources.list.d/arx-ubuntu-release-bionic.list:deb http://ppa.launchpad.net/arx/release/ubuntu focal main
/etc/apt/sources.list.d/jtaylor-ubuntu-keepass-bionic.list:deb http://ppa.launchpad.net/jtaylor/keepass/ubuntu focal main
/etc/apt/sources.list.d/team-xbmc-ubuntu-ppa-focal.list:deb http://ppa.launchpad.net/team-xbmc/ppa/ubuntu focal main
/etc/apt/sources.list.d/nodesource.list:deb https://deb.nodesource.com/node_15.x focal main
/etc/apt/sources.list.d/linuxuprising-ubuntu-guake-bionic.list:deb http://ppa.launchpad.net/linuxuprising/guake/ubuntu focal main
/etc/apt/sources.list.d/otto-kesselgulasch-ubuntu-gimp-bionic.list:deb http://ppa.launchpad.net/otto-kesselgulasch/gimp/ubuntu focal main
/etc/apt/sources.list.d/diesch-ubuntu-stable-focal.list:deb http://ppa.launchpad.net/diesch/stable/ubuntu focal main
/etc/apt/sources.list.d/dlech-ubuntu-keepass2-plugins-beta-bionic.list:# deb http://ppa.launchpad.net/dlech/keepass2-plugins-beta/ubuntu bionic main
/etc/apt/sources.list.d/savoury1-ubuntu-build-tools-bionic.list:# deb http://ppa.launchpad.net/savoury1/build-tools/ubuntu bionic main
/etc/apt/sources.list.d/takkat-nebuk-ubuntu-takkat-bionic.list:deb http://ppa.launchpad.net/takkat-nebuk/takkat/ubuntu focal main
/etc/apt/sources.list.d/xrdesktop-ubuntu-xrdesktop-focal.list:deb http://ppa.launchpad.net/xrdesktop/xrdesktop/ubuntu focal main
/etc/apt/sources.list.d/kisak-ubuntu-kisak-mesa-bionic.list:deb http://ppa.launchpad.net/kisak/kisak-mesa/ubuntu focal main
/etc/apt/sources.list.d/gregory-hainaut-ubuntu-pcsx2_official_ppa-focal.list:# deb http://ppa.launchpad.net/gregory-hainaut/pcsx2.official.ppa/ubuntu focal main
N0rbert avatar
zw flag
Please add the output of `apt-cache policy distro-info-data distro-info` to the question. The *sav* suffix indicates 3rd party origin.
N0rbert avatar
zw flag
Please add the output of `dpkg -l | grep sav`, `aptitude search ~o` to the question. We need to filter out all local packages and packages from *savoury1* PPA.
N0rbert avatar
zw flag
Please add the output of `grep -r "deb\ " /etc/apt/ --include=*.list` to the question or upload it to pastebin if long.
Steve avatar
us flag
Note that while there are references to bionic sources, they are all commented out.
N0rbert avatar
zw flag
I need the output. They were active in the 18.04 LTS time.
Steve avatar
us flag
Understood. Your assistance is much appreciated.
N0rbert avatar
zw flag
See updated answer.
Score:0
zw flag

The sav package version suffix indicates 3rd party package origin.

Before we start please backup your package list by dpkg -l > ~/focal-list.txt .

Then there are many clues about the previously added savoury1 PPA for Ubuntu 18.04 LTS. It is bad that you have not purged it before upgrading to 20.04 LTS.
We should hack it in the following way - we will add this repository back and then purge it by ppa-purge.

Let's do it:

sudo apt-get install ppa-purge
sudo add-apt-repository ppa:savoury1/build-tools
# the trick - switch PPA to 18.04 LTS (bionic)
sudo sed -i "s/focal/bionic/g" /etc/apt/sources.list.d/savoury1-ubuntu-build-tools-focal.list
sudo apt-get update
sudo ppa-purge ppa:savoury1/build-tools

and confirm package versions downgrade.

Steve avatar
us flag
sudo apt-get install distro-info-data=0.43ubuntu1.5 lists a bunch of immediate packages for removal, but I'm pretty sure that the removal of those has cascading implications for most of the rest of my OS...
Steve avatar
us flag
I've encountered situations before where telling APT to install something that apt then identifies as calling for the removal of installed software can sometimes have additional hidden implications that have royally messed up the systems, which is what I'm trying to avoid here. Since apt clearly recognizes the installation of distro-info-data=0.43ubuntu1.5 as a downgrade, why does the version I have provided by the OS as part of the upgrade to 20.04 not satisfy the distro-info dependency?
Steve avatar
us flag
Sweet, ok, this makes sense. PPA purged, relevant packages downgraded. Presumably, the oversight in not purging the *savoury1* PPA before doing the OS upgrade to 20.04 is what prompted that process to generate the custom .sav packages, which then (presumably because they were identified as non-standard packages) didn't qualify as satisfying the dependencies needed to execute the upgrades (which have been processed just fine now). Fixing that bad branch and downgrading the relevant packages impacted cleared up the dependency issue, and I think I see how you identified that too. ~Many Thanks!
N0rbert avatar
zw flag
Great! This was interesting issue :)
Steve avatar
us flag
For future reference, in case others run up against this issue: when executing the OS upgrade from 18.04 to 20.04, I neither purged the *savoury1* PPA nor previously dealt with the fact that the automated distribution upgrade failed to find replacement Focal PPA resources for that repository. Because I also kept the Bionic *savoury1* packages, that presumably forced the dist-upgrade process to build custom "merge" packages (with version strings ending in ```.sav0```) to satisfy the otherwise-incompatible dependencies needed. Now that this has been corrected, the dependency issues are gone. :)
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.