当依赖项似乎有故障时,如何安装调试符号?

当依赖项似乎有故障时,如何安装调试符号?

问题

我该如何纠正该问题以成功安装调试符号包?

注意:将现有的“主要”包换成另一个包就可以让它工作了。

问题说明

按照说明操作后这里为了使 APT 能够“看到”调试包,我想要安装包libmagick++-6.q16-8 libmagick++-6.q16-8-dbgsym,即二进制文件加上调试符号。

唉,尝试失败了:

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

事实上它apt show告诉我它依赖于包名称没有绰号ubuntu*

# 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)

当我执行此操作时,我得到了一个似乎符合要求的apt download文件。并且似乎同意:libmagick++-6.q16-8-dbgsym_8%3a6.9.11.60+dfsg-1.3build2_amd64.ddebapt policy

# 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

从今天起Packages对于我的包裹想法我想要安装以下内容:

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

...因此指出池/宇宙/i/imagemagick/libmagick++-6.q16-8-dbgsym_6.9.11.60+dfsg-1.3build2_amd64.ddeb这正是已下载的文件apt download(我检查过了)。

我确保删除了所有其他 APT 源(除了按照说明执行 ddeb) 并apt update排除这些来源的干扰(尽管apt policy如果是这种情况的话,它应该是从输出中可见的)。

重新阅读错误消息,我发现问题出在已安装的版本libmagick++-6.q16-8(自动选择的)上:

# 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

但是,尝试将不需要的版本固定在较低优先级并没有奏效:

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

系统是最新的 Ubuntu 22.04。

# dpkg --print-architecture
amd64

sources.list和单个下属文件的全部内容:

$ 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

尝试手动安装dpkg -i下载的版本,.ddeb得到如下结果:

# 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

相关内容