全新安装 16.04 后无法升级软件包

全新安装 16.04 后无法升级软件包

我正在使用基于 Ubuntu 16.04 LTS 的发行版 KDE Neon。

当做

# apt update
# apt dist-upgrade

我得到了以下结果:

Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
  debconf-kde-data libcln6 libdbusmenu-gtk4 libdebconf-kde1 libllvm3.8 libokular5core7 libqmi-glib1 libqt5designer5 libqt5designercomponents5 libqt5help5 qapt-deb-installer
  qt5-assistant qttools5-dev-tools snap-confine ubuntu-core-launcher
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  libqalculate5-data libqalculate5v5 qtvirtualkeyboard
The following NEW packages will be installed:
  apt-xapian-index cryfs curl docker-neon drkonqi drkonqi-pk-debug-installer encfs kde-config-plymouth kwin-wayland kwin-wayland-backend-drm libcfitsio2 libchm1 libcolorcorrect5
  libcrypto++9v5 libcurl3 libdbusmenu-gtk3-4 libevent-2.0-5 libkf5kiogui5 libmarkdown2 libminizip1 libokular5core8 libqalculate14 libqalculate14-data libqmi-glib5 libqt5test5
  libqt5webengine-data libqt5webengine5 libqt5webenginecore5 libqt5webenginewidgets5 libre2-1v5 libtinyxml2-2v5 libwebpdemux1 libxapian-1.3-5 linux-headers-4.4.0-119
  linux-headers-4.4.0-119-generic linux-image-4.4.0-119-generic linux-image-extra-4.4.0-119-generic okular-extra-backends plasma-vault plasma-workspace-wayland
  pulseaudio-module-gconf python3-xapian1.3 qml-module-qtwebengine qtvirtualkeyboard-plugin xwayland
The following packages will be upgraded:
  apparmor apt-transport-https avahi-autoipd avahi-daemon bind9-host binutils bluez-cups bluez-obexd ca-certificates catdoc cracklib-runtime cryptsetup cryptsetup-bin
  desktop-file-utils distro-info-data dnsmasq-base dnsutils eject firefox fwupd fwupdate fwupdate-signed gdbserver gstreamer1.0-x gwenview hdparm imagemagick imagemagick-6.q16
  imagemagick-common iproute2 isc-dhcp-client isc-dhcp-common kdeplasma-addons-data kio-extras kio-extras-data krb5-locales kwin-addons less libapparmor-perl libappstream-glib8
  libavahi-core7 libavahi-glib1 libavcodec-ffmpeg56 libavfilter-ffmpeg5 libavformat-ffmpeg56 libavresample-ffmpeg2 libavutil-ffmpeg54 libbind9-140 libbluetooth3 libcrack2
  libcurl3-gnutls libdfu1 libdns-export162 libdns162 libexiv2-14 libfdisk1 libfwup0 libfwupd1 libgcab-1.0-0 libgd3 libgraphite2-3 libgtk-3-bin libisc-export160 libisc160 libisccc140
  libisccfg140 libjasper1 liblouis-data liblouis9 liblwres141 libmagickcore-6.q16-2 libmagickcore-6.q16-2-extra libmagickwand-6.q16-2 libmbim-glib4 libmbim-proxy libmm-glib0
  libmysqlclient20 libnl-3-200 libnl-genl-3-200 libnm0 libnspr4 libnss3 libnss3-nssdb libnuma1 libparted2 libpci3 libpcsclite1 libplist3 libplymouth4 libpoppler-qt5-1
  libpostproc-ffmpeg53 libpython-stdlib libqapt3 libqmi-proxy libraw15 libruby2.3 libsane libsane-common libsmartcols1 libsnmp-base libsnmp30 libsoup-gnome2.4-1
  libswresample-ffmpeg1 libswscale-ffmpeg3 libxatracker2 linux-firmware linux-generic linux-headers-generic linux-image-generic logrotate lshw makedev mesa-vdpau-drivers
  modemmanager multiarch-support mysql-common nano neon-desktop neon-settings network-manager ntfs-3g okular openssh-client openssl os-prober parted pciutils
  plasma-dataengines-addons plasma-pa plasma-runners-addons plasma-wallpapers-addons plasma-widgets-addons plasma-workspace plymouth plymouth-label plymouth-theme-ubuntu-text python
  python-apt-common python-minimal python3-apt python3-distupgrade python3-pil python3-software-properties qml-module-qtquick-virtualkeyboard resolvconf rsync ruby2.3 sane-utils
  sensible-utils snap-confine snapd sni-qt software-properties-common squashfs-tools sudo tcpdump thermald tzdata ubuntu-core-launcher ubuntu-drivers-common ubuntu-minimal
  ubuntu-release-upgrader-core ubuntu-standard unattended-upgrades uuid-runtime va-driver-all wget wpasupplicant xdg-user-dirs xfonts-utils xfsprogs xserver-xorg-video-amdgpu
  xul-ext-ubufox
173 upgraded, 45 newly installed, 3 to remove and 0 not upgraded.
Need to get 0 B/281 MB of archives.
After this operation, 641 MB of additional disk space will be used.
Do you want to continue? [S/n] 
Extracting templates from packages: 100%
Preconfiguring packages ...
(Reading database ... 140054 files and directories currently installed.)
Preparing to unpack .../drkonqi_5.12.4-0neon+16.04+xenial+build16_amd64.deb ...
Unpacking drkonqi (5.12.4-0neon+16.04+xenial+build16) ...
dpkg: error processing archive /var/cache/apt/archives/drkonqi_5.12.4-0neon+16.04+xenial+build16_amd64.deb (--unpack):
 trying to overwrite '/usr/lib/x86_64-linux-gnu/libexec/drkonqi', which is also in package plasma-workspace 4:5.8.5-0neon+16.04+build61
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/drkonqi_5.12.4-0neon+16.04+xenial+build16_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

我尝试删除/var/cache/apt/archives/drkonqi_5.12.4-0neon+16.04+xenial+build16_amd64.deb但没有成功。

在其他装有 KDE Neon 的计算机上,我可以毫无问题地升级任何软件包。

请问有什么帮助吗?

更新

在运行正常的计算机中:

# apt-cache policy drkonqi plasma-workspace
drkonqi:
  Installed: 5.12.4-0neon+16.04+xenial+build16
  Candidate: 5.12.4-0neon+16.04+xenial+build16
  Version table:
 *** 5.12.4-0neon+16.04+xenial+build16 500
        500 http://archive.neon.kde.org/user xenial/main amd64 Packages
        100 /var/lib/dpkg/status
     5.12.3-0neon+16.04+xenial+build15 500
        500 http://archive.neon.kde.org/user xenial/main amd64 Packages
     5.12.2-0neon+16.04+xenial+build14 500
        500 http://archive.neon.kde.org/user xenial/main amd64 Packages
     5.12.1-0neon+16.04+xenial+build13 500
        500 http://archive.neon.kde.org/user xenial/main amd64 Packages
plasma-workspace:
  Installed: 4:5.12.4-0neon+16.04+xenial+build120
  Candidate: 4:5.12.4-0neon+16.04+xenial+build120
  Version table:
 *** 4:5.12.4-0neon+16.04+xenial+build120 500
        500 http://archive.neon.kde.org/user xenial/main amd64 Packages
        100 /var/lib/dpkg/status
     4:5.12.4-0neon+16.04+xenial+build119 500
        500 http://archive.neon.kde.org/user xenial/main amd64 Packages
     4:5.12.4-0neon+16.04+xenial+build118 500
        500 http://archive.neon.kde.org/user xenial/main amd64 Packages
     4:5.12.3-0neon+16.04+xenial+build117 500
        500 http://archive.neon.kde.org/user xenial/main amd64 Packages
     4:5.5.5.2-0ubuntu1.1 500
        500 http://es.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages
        500 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages
     4:5.5.5.2-0ubuntu1 500
        500 http://es.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages

在出现所述问题的计算机中:

$ apt-cache policy drkonqi plasma-workspace
drkonqi:
  Instalados: (ninguno)
  Candidato:  5.12.4-0neon+16.04+xenial+build16
  Tabla de versión:
     5.12.4-0neon+16.04+xenial+build16 500
        500 http://archive.neon.kde.org/user xenial/main amd64 Packages
     5.12.3-0neon+16.04+xenial+build15 500
        500 http://archive.neon.kde.org/user xenial/main amd64 Packages
     5.12.2-0neon+16.04+xenial+build14 500
        500 http://archive.neon.kde.org/user xenial/main amd64 Packages
     5.12.1-0neon+16.04+xenial+build13 500
        500 http://archive.neon.kde.org/user xenial/main amd64 Packages
plasma-workspace:
  Instalados: 4:5.8.5-0neon+16.04+build61
  Candidato:  4:5.12.4-0neon+16.04+xenial+build120
  Tabla de versión:
     4:5.12.4-0neon+16.04+xenial+build120 500
        500 http://archive.neon.kde.org/user xenial/main amd64 Packages
     4:5.12.4-0neon+16.04+xenial+build119 500
        500 http://archive.neon.kde.org/user xenial/main amd64 Packages
     4:5.12.4-0neon+16.04+xenial+build118 500
        500 http://archive.neon.kde.org/user xenial/main amd64 Packages
     4:5.12.3-0neon+16.04+xenial+build117 500
        500 http://archive.neon.kde.org/user xenial/main amd64 Packages
 *** 4:5.8.5-0neon+16.04+build61 100
        100 /var/lib/dpkg/status
     4:5.5.5.2-0ubuntu1.1 500
        500 http://es.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages
        500 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages
     4:5.5.5.2-0ubuntu1 500
        500 http://es.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages

我看到的一个区别是:

4:5.8.5-0neon+16.04+build61 100
        100 /var/lib/dpkg/status

答案1

此问题通常是由以下两个原因之一引起的:

  • 您正在混合来自两个稍微不兼容的存储库的软件包。
  • 只是包装错误。

无论哪种方式,在非核心包中,使用 dpkg 强制安装然后恢复操作通常是安全的。

sudo dpkg --force-overwrite -i /var/cache/apt/archives/drkonqi_5.12.4-0neon+16.04+xenial+build16_amd64.deb

强制性免责声明dpkg 使用手册

警告:这些选项主要供专家使用。在未完全了解其效果的情况下使用它们可能会破坏整个系统。

强制覆盖该文件后,您可能可以恢复升级。

sudo apt-get dist-upgrade

相关内容