如何修复 mk-build-deps:无法安装所有 build-dep 包?

如何修复 mk-build-deps:无法安装所有 build-dep 包?

Ubuntu 20.04.2 焦点窝。

我的目标是通过 mk-build-deps 安装 KDE 调试符号。

为此,我创建了一个名为source-control以下内​​容的文本文件:

Source: my-kde-dbg-symbols
Priority: optional
Maintainer: Lyubomir <[email protected]>
Build-Depends: dconf-gsettings-backend-dbgsym,glib-networking-dbgsym,gvfs-dbgsym,gvfs-libs-dbgsym,kde-style-breeze-dbgsym,kimageformat-plugins-dbgsym,libacl1-dbgsym,libarchive13-dbgsym,libassuan0-dbgsym,libavahi-client3-dbgsym,libavahi-common3-dbgsym,libavahi-glib1-dbgsym,libbrotli1-dbgsym,libbsd0-dbgsym,libbz2-1.0-dbgsym,libcanberra0-dbgsym,libcom-err2-dbgsym,libdbusmenu-qt5-2-dbgsym,libdconf1-dbgsym,libdouble-conversion3-dbgsym,libexpat1-dbgsym,libfam0-dbgsym,libffi7-dbgsym,libflatpak0-dbgsym,libfontconfig1-dbgsym,libfreetype6-dbgsym,libgcrypt20-dbgsym,libgl1-dbgsym,libglib2.0-0-dbgsym,libglvnd0-dbgsym,libglx0-dbgsym,libgmp10-dbgsym,libgnutls30-dbgsym,libgpg-error0-dbgsym,libgpgme11-dbgsym,libgraphite2-3-dbgsym,libharfbuzz0b-dbgsym,libhogweed5-dbgsym,libice6-dbg,libicu66-dbgsym,libidn2-0-dbgsym,libilmbase24-dbgsym,libjbig0-dbgsym,libjpeg-turbo8-dbg,libjson-glib-1.0-0-dbgsym,libkeyutils1-dbgsym,libkf5archive5-dbgsym,libkf5attica5-dbgsym,libkf5authcore5-dbgsym,libkf5bookmarks5-dbgsym,libkf5codecs5-dbgsym,libkf5completion5-dbgsym,libkf5configcore5-dbgsym,libkf5configgui5-dbgsym,libkf5configwidgets5-dbgsym,libkf5coreaddons5-dbgsym,libkf5crash5-dbgsym,libkf5dbusaddons5-dbgsym,libkf5globalaccel5-dbgsym,libkf5guiaddons5-dbgsym,libkf5i18n5-dbgsym,libkf5iconthemes5-dbgsym,libkf5itemviews5-dbgsym,libkf5jobwidgets5-dbgsym,libkf5kiocore5-dbgsym,libkf5kiofilewidgets5-dbgsym,libkf5kiowidgets5-dbgsym,libkf5notifications5-dbgsym,libkf5service5-dbgsym,libkf5solid5-dbgsym,libkf5style5-dbgsym,libkf5waylandclient5-dbgsym,libkf5widgetsaddons5-dbgsym,libkf5windowsystem5-dbgsym,libkf5xmlgui5-dbgsym,libkrb5-dbg,liblcms2-2-dbgsym,libltdl7-dbgsym,liblz4-1-dbgsym,liblzma5-dbgsym,libmng2-dbgsym,libnettle7-dbgsym,libnss-mdns-dbgsym,libogg-dbg,libopenexr24-dbgsym,libostree-1-1-dbgsym,libp11-kit0-dbgsym,libpackagekitqt5-1-dbgsym,libpcre2-16-0-dbgsym,libpcre2-8-0-dbgsym,libpcre3-dbg,libpng16-16-dbgsym,libpsl5-dbgsym,libqt5core5a-dbgsym,libqt5dbus5-dbgsym,libqt5gui5-dbgsym,libqt5network5-dbgsym,libqt5printsupport5-dbgsym,libqt5qml5-dbgsym,libqt5quick5-dbgsym,libqt5quickcontrols2-5-dbgsym,libqt5quicktemplates2-5-dbgsym,libqt5svg5-dbgsym,libqt5texttospeech5-dbgsym,libqt5widgets5-dbgsym,libqt5x11extras5-dbgsym,libqt5xml5-dbgsym,libseccomp2-dbgsym,libselinux1-dbgsym,libsm6-dbgsym,libsoup2.4-1-dbgsym,libsqlite3-0-dbgsym,libstdc++6-10-dbg,libsystemd0-dbgsym,libtasn1-6-dbgsym,libtdb1-dbgsym,libtiff5-dbgsym,libudev1-dbgsym,libunistring2-dbgsym,libvorbis0a-dbgsym,libvorbisfile3-dbgsym,libwayland-client0-dbgsym,libwebp6-dbgsym,libwebpdemux2-dbgsym,libx11-6-dbgsym,libx11-xcb1-dbgsym,libxau6-dbg,libxcb-icccm4-dbgsym,libxcb-image0-dbgsym,libxcb-keysyms1-dbgsym,libxcb-randr0-dbgsym,libxcb-render-util0-dbgsym,libxcb-render0-dbgsym,libxcb-shape0-dbgsym,libxcb-shm0-dbgsym,libxcb-sync1-dbgsym,libxcb-util1-dbgsym,libxcb-xfixes0-dbgsym,libxcb-xinerama0-dbgsym,libxcb-xinput0-dbgsym,libxcb-xkb1-dbgsym,libxcb1-dbgsym,libxcursor1-dbgsym,libxdmcp6-dbg,libxfixes3-dbgsym,libxkbcommon-x11-0-dbgsym,libxkbcommon0-dbgsym,libxml2-dbgsym,libxrender1-dbgsym,libzstd1-dbgsym,plasma-discover-backend-flatpak-dbgsym,plasma-discover-dbgsym,plasma-integration-dbgsym,qt5-image-formats-plugins-dbgsym
Standards-Version: 3.9.5 

然后我已经跑了sudo mk-build-deps --install source-control

但是,我收到此错误:

Selecting previously unselected package my-kde-dbg-symbols-build-deps.
(Reading database ... 416720 files and directories currently installed.)
Preparing to unpack my-kde-dbg-symbols-build-deps_1.0_all.deb ...
Unpacking my-kde-dbg-symbols-build-deps (1.0) ...
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies...Starting pkgProblemResolver with broken count: 1
Starting 2 pkgProblemResolver with broken count: 1
Investigating (0) my-kde-dbg-symbols-build-deps:amd64 < 1.0 @iU mK Nb Ib >
Broken my-kde-dbg-symbols-build-deps:amd64 Depends on glib-networking-dbgsym:amd64 < none | 2.64.1-1 @un uH >
  Considering glib-networking-dbgsym:amd64 1 as a solution to my-kde-dbg-symbols-build-deps:amd64 -2
  Removing my-kde-dbg-symbols-build-deps:amd64 rather than change glib-networking-dbgsym:amd64
Done
 Done
Starting pkgProblemResolver with broken count: 0
Starting 2 pkgProblemResolver with broken count: 0
Done
The following additional packages will be installed:
  build-essential g++ g++-9 libstdc++-9-dev
Suggested packages:
  g++-multilib g++-9-multilib gcc-9-doc libstdc++-9-doc
The following packages will be REMOVED
  my-kde-dbg-symbols-build-deps
The following NEW packages will be installed
  build-essential g++ g++-9 libstdc++-9-dev
0 to upgrade, 4 to newly install, 1 to remove and 0 not to upgrade.
1 not fully installed or removed.
Need to get 1604 B/10,1 MB of archives.
After this operation, 46,7 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://bg.archive.ubuntu.com/ubuntu focal/main amd64 g++ amd64 4:9.3.0-1ubuntu2 [1604 B]
Fetched 1604 B in 0s (8944 B/s)
(Reading database ... 416724 files and directories currently installed.)
Removing my-kde-dbg-symbols-build-deps (1.0) ...
Selecting previously unselected package libstdc++-9-dev:amd64.
(Reading database ... 416720 files and directories currently installed.)
Preparing to unpack .../libstdc++-9-dev_9.3.0-17ubuntu1~20.04_amd64.deb ...
Unpacking libstdc++-9-dev:amd64 (9.3.0-17ubuntu1~20.04) ...
Selecting previously unselected package g++-9.
Preparing to unpack .../g++-9_9.3.0-17ubuntu1~20.04_amd64.deb ...
Unpacking g++-9 (9.3.0-17ubuntu1~20.04) ...
Selecting previously unselected package g++.
Preparing to unpack .../g++_4%3a9.3.0-1ubuntu2_amd64.deb ...
Unpacking g++ (4:9.3.0-1ubuntu2) ...
Selecting previously unselected package build-essential.
Preparing to unpack .../build-essential_12.8ubuntu1.1_amd64.deb ...
Unpacking build-essential (12.8ubuntu1.1) ...
Setting up libstdc++-9-dev:amd64 (9.3.0-17ubuntu1~20.04) ...
Setting up g++-9 (9.3.0-17ubuntu1~20.04) ...
Setting up g++ (4:9.3.0-1ubuntu2) ...
update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode
Setting up build-essential (12.8ubuntu1.1) ...
Processing triggers for man-db (2.9.1-1) ...
mk-build-deps: Unable to install my-kde-dbg-symbols-build-deps at /usr/bin/mk-build-deps line 457.
mk-build-deps: Unable to install all build-dep packages

运行dpkg -l | grep glib表明我已经安装了2.64.2-1ubuntu0.1版本glib-networking

我不知道如何让它接受当前安装的版本作为正确版本。从我的文件内容可以看出,source-control我没有对版本设置任何限制,这意味着它们是由设置的mk-build-deps。我不知道它为什么决定要求版本2.64.1-1 @un uH,也不知道这是否是一个有效的版本。

答案1

问题不在于 mk-build-deps,而在于依赖项。

我所做的就是尝试使用文件apt install中的所有软件包source-control。这揭示了真正的问题:

glib-networking-dbgsym:依赖:glib-networking(= 2.64.1-1)但需要安装 2.64.2-1ubuntu0.1

发生这种情况是因为focal-updates有一个比 更新的版本focal,默认情况下使用 。所以我apt install glib-networking-services=2.64.1-1这样做了,这表明虽然glib-networking要降级,但这也将删除大量对 plasma-desktop 至关重要的软件包,所以我放弃了安装它的尝试。

幸运的是,在这种特定情况下,我设法减少了 Build-Dependencies 的数量,以至于所有需要安装的软件包都不会发生冲突。

相关内容