Score:0

How to install debug symbols when the dependency seems to be faulty?

in flag

Question

How do I rectify the issue to install the debug symbol package successfully?

NB: It is perfectly fine to swap the existing "main" package for another one to get it to work.

Description of the issue

After following the instructions here to enable APT to "see" debug packages, I wanted to install the packages libmagick++-6.q16-8 libmagick++-6.q16-8-dbgsym, i.e. the binaries plus debug symbols.

Alas, the attempt fails with:

The following packages have unmet dependencies:
 libmagick++-6.q16-8-dbgsym : Depends: libmagick++-6.q16-8 (= 8:6.9.11.60+dfsg-1.3build2) but 8:6.9.11.60+dfsg-1.3ubuntu0.22.04.3 is to be installed

And indeed the apt show tells me that it depends on a package name without the ubuntu* moniker:

# apt show libmagick++-6.q16-8-dbgsym 2>/dev/null|grep Depends:
Depends: libmagick++-6.q16-8 (= 8:6.9.11.60+dfsg-1.3build2)

When doing an apt download I get a file libmagick++-6.q16-8-dbgsym_8%3a6.9.11.60+dfsg-1.3build2_amd64.ddeb which would seem to fit the bill, though. And apt policy appears to agree:

# apt policy libmagick++-6.q16-8-dbgsym
libmagick++-6.q16-8-dbgsym:
  Installed: (none)
  Candidate: 8:6.9.11.60+dfsg-1.3build2
  Version table:
     8:6.9.11.60+dfsg-1.3build2 500
        500 http://ddebs.ubuntu.com jammy/universe amd64 Packages

As of today the entry from Packages for the package I thought I'd want to install reads:

Package: libmagick++-6.q16-8-dbgsym
Package-Type: ddeb
Architecture: amd64
Version: 8:6.9.11.60+dfsg-1.3build2
Auto-Built-Package: debug-symbols
Multi-Arch: same
Priority: optional
Section: debug
Source: imagemagick
Maintainer: Ubuntu Developers <[email protected]>
Original-Maintainer: ImageMagick Packaging Team <[email protected]>
Installed-Size: 1494
Depends: libmagick++-6.q16-8 (= 8:6.9.11.60+dfsg-1.3build2)
Breaks: imagemagick-dbg (<< 8:6.9.2.10-1~)
Replaces: imagemagick-dbg (<< 8:6.9.2.10-1~)
Filename: pool/universe/i/imagemagick/libmagick++-6.q16-8-dbgsym_6.9.11.60+dfsg-1.3build2_amd64.ddeb
Size: 1320870
MD5sum: 6deff8b4e583f519169495b500cc3ab3
SHA1: 0639e18ce8834d89b1266a51797729e856d64880
SHA256: ff36d7de91b6dd478b6a55c4e78905b92a340b6004efb4feee13eb312eee9e46
SHA512: b9ffc956ae1aaf899668ecd08eed873192f4f44bf9060d0f7881923ff065a49a2ac23a7ff6703f22631fc74d1ffc09a5d38b0482a3fb36f7f9f418a2500e6095
Description: debug symbols for libmagick++-6.q16-8
Build-Ids: 583b0d85bbefc1a4bc07f249fea48ceab868673c

... and so points to pool/universe/i/imagemagick/libmagick++-6.q16-8-dbgsym_6.9.11.60+dfsg-1.3build2_amd64.ddeb which is the exact file apt download has downloaded (I checked).

I made sure to remove all additional APT sources (other than for the ddeb as per the instruction) and apt update to rule out interference from those sources (although it should have been visible from apt policy output if that were the case).

Re-reading the error message, I figured that the issue is the version of the already installed libmagick++-6.q16-8 (which got automatically picked):

# apt policy libmagick++-6.q16-8
libmagick++-6.q16-8:
  Installed: 8:6.9.11.60+dfsg-1.3ubuntu0.22.04.3
  Candidate: 8:6.9.11.60+dfsg-1.3ubuntu0.22.04.3
  Version table:
 *** 8:6.9.11.60+dfsg-1.3ubuntu0.22.04.3 500
        500 http://de.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages
        500 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 Packages
        100 /var/lib/dpkg/status
     8:6.9.11.60+dfsg-1.3build2 500
        500 http://de.archive.ubuntu.com/ubuntu jammy/universe amd64 Packages

Attempting to pin the undesired version at lower priority didn't work, however:

Package: libmagick++-*
Pin: version *ubuntu0.*
Pin-Priority: 100

System is an up-to-date Ubuntu 22.04.

# dpkg --print-architecture
amd64

Full contents of the sources.list and a single subordinate file:

$ grep -vP '^(#|\s*$)' /etc/apt/sources.list /etc/apt/sources.list.d/*.list
/etc/apt/sources.list:deb http://de.archive.ubuntu.com/ubuntu/ jammy main restricted
/etc/apt/sources.list:deb http://de.archive.ubuntu.com/ubuntu/ jammy-updates main restricted
/etc/apt/sources.list:deb http://de.archive.ubuntu.com/ubuntu/ jammy universe
/etc/apt/sources.list:deb http://de.archive.ubuntu.com/ubuntu/ jammy-updates universe
/etc/apt/sources.list:deb http://de.archive.ubuntu.com/ubuntu/ jammy multiverse
/etc/apt/sources.list:deb http://de.archive.ubuntu.com/ubuntu/ jammy-updates multiverse
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu jammy-security main restricted
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu jammy-security universe
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu jammy-security multiverse
/etc/apt/sources.list.d/ddebs.list:deb http://ddebs.ubuntu.com jammy main restricted universe multiverse
/etc/apt/sources.list.d/ddebs.list:deb http://ddebs.ubuntu.com jammy-updates main restricted universe multiverse
/etc/apt/sources.list.d/ddebs.list:deb http://ddebs.ubuntu.com jammy-proposed main restricted universe multiverse

Attempting manual installation with dpkg -i of the downloaded .ddeb I get:

# dpkg -i libmagick++-6.q16-8-dbgsym_6.9.11.60+dfsg-1.3build2_amd64.ddeb
Selecting previously unselected package libmagick++-6.q16-8-dbgsym:amd64.
(Reading database ... 220284 files and directories currently installed.)
Preparing to unpack libmagick++-6.q16-8-dbgsym_6.9.11.60+dfsg-1.3build2_amd64.ddeb ...
Unpacking libmagick++-6.q16-8-dbgsym:amd64 (8:6.9.11.60+dfsg-1.3build2) ...
dpkg: dependency problems prevent configuration of libmagick++-6.q16-8-dbgsym:amd64:
 libmagick++-6.q16-8-dbgsym:amd64 depends on libmagick++-6.q16-8 (= 8:6.9.11.60+dfsg-1.3build2); however:
  Version of libmagick++-6.q16-8:amd64 on system is 8:6.9.11.60+dfsg-1.3ubuntu0.22.04.3.

dpkg: error processing package libmagick++-6.q16-8-dbgsym:amd64 (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 libmagick++-6.q16-8-dbgsym:amd64
guiverc avatar
cn flag
What architecture are you using? Your details show *depends* & sources requirements from different architectures thus it appears to me that you're sources are polluted by added and incompatible architectures. Are you using *amd64 i386* OR *arm64 armhf ppc64el riscv64 s390x* as this is what has created your issues it appears to me..
in flag
@guiverc I am using both `amd64` and `i386`. The latter is required for a bunch of packages related to Wine. Could you detail which discrepancy you are referring to? I didn't notice any, even after looking at it again now ...
guiverc avatar
cn flag
I picked one package from your list & contrasted packages what you provided with package expected and as you can see at https://packages.ubuntu.com/search?keywords=libmagick%2B%2B-6.q16-8&searchon=names&suite=all&section=all your details match a system I feel a system with polluted sources/packages for more than one incompatible architecture (and not *amd64* & *i386* that match you'll note in the link; but as stated in prior comment
in flag
@guiverc that's a fair point. I commented out the `backports` line in `sources.list` now (but it makes no difference to `apt policy` as I had already assumed based on the respective source URLs). However, if you are right, that actually worsens the problem, because it suggests that there isn't a corresponding debug symbol package _at all_ to go with the "main" package(s) available ... at least there's no `libmagick++-6.q16-8-dbgsym` with a matching version, nor a `-dbg` package _at all_. But the "wrong" `-dbgsym` package at least has the correct arch, although not being listed :-|
I sit in a Tesla and translated this thread with Ai:

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.