我最近(约 3-4 周)安装了 Kubuntu(干净,不是升级)。
今天我发现尝试升级系统时报告有 50 个包被保留:
user@machine:~$ sudo apt update
Hit:1 https://swupdate.openvpn.net/community/openvpn3/repos jammy InRelease
Hit:2 http://ro.archive.ubuntu.com/ubuntu jammy InRelease
Hit:3 http://security.ubuntu.com/ubuntu jammy-security InRelease
Hit:4 http://ro.archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:5 http://ro.archive.ubuntu.com/ubuntu jammy-backports InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
50 packages can be upgraded. Run 'apt list --upgradable' to see them.
user@machine:~$ sudo apt upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
kde-config-sddm kde-config-updates kde-style-oxygen-qt5 kinfocenter ksystemstats kwin-common kwin-data kwin-x11 layer-shell-qt libcolorcorrect5 libkf5sysguard-data libkfontinst5 libkfontinstui5 libksgrd9
libksysguardformatter1 libksysguardsensorfaces1 libksysguardsensors1 libksysguardsystemstats1 libkwaylandserver5 libkwineffects13 libkwinglutils13 libkwinxrenderutils13 libkworkspace5-5 liblayershellqtinterface5
libnotificationmanager1 liboxygenstyle5-5 liboxygenstyleconfig5-5 libplasma-geolocation-interface5 libprocesscore9 libprocessui9 libtaskmanager6 libweather-ion7 milou oxygen-sounds php8.1-cli php8.1-common php8.1-opcache
php8.1-readline plasma-desktop plasma-desktop-data plasma-discover plasma-discover-backend-fwupd plasma-discover-backend-snap plasma-discover-common plasma-nm plasma-pa plasma-workspace qml-module-org-kde-ksysguard
systemsettings xdg-desktop-portal-kde
0 upgraded, 0 newly installed, 0 to remove and 50 not upgraded.
packages have been kept back
自安装操作系统以来,我已收到两次该消息,但它列出了一个或两个软件包,我通过以下方式解决了该问题:
sudo apt upgrade package1 package2 ...
然而,这次似乎出现了依赖性错误:
user@machine:~$ sudo apt upgrade systemsettings
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... 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:
plasma-workspace : Depends: libkworkspace5-5 (= 4:5.24.4-0ubuntu1) but 4:5.24.6-0ubuntu0.1 is to be installed
E: Broken packages
我已尝试过:
apt update
apt install -f
apt clean
rm /var/cache/apt/archives/*.deb && rm -R /var/cache/apt/archives/partial
apt upgrade --fix-missing
apt upgrade --fix-broken
apt --fix-broken install
...可能还有一两个。
这是什么原因造成的?我该如何解决这个问题?
后续编辑#1:
policy
的输出plasma-workspace
:
apt-cache policy plasma-workspace
plasma-workspace:
Installed: 4:5.24.4-0ubuntu1
Candidate: 4:5.24.6-0ubuntu0.1
Version table:
4:5.24.6-0ubuntu0.1 500 (phased 10%)
500 http://ro.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages
*** 4:5.24.4-0ubuntu1 500
500 http://ro.archive.ubuntu.com/ubuntu jammy/universe amd64 Packages
100 /var/lib/dpkg/status
后续编辑#2:
正如在接受的答案中指出的那样,这种延迟升级是故意的并且是正常的 - 并且在发布问题两天后,所有软件包都在我的系统上成功升级。
答案1
查看输出中的行apt-cache policy
:
Version table:
4:5.24.6-0ubuntu0.1 500 (phased 10%)
让我们关注这一点(phased 10%)
:这意味着该包正在执行分阶段更新。
你的系统没有问题。没有损坏。
分阶段更新持续一周左右。早期采用者可以报告问题,允许开发人员撤回导致意外问题的更新。这可以防止升级失败影响数百万用户。升级失败的情况非常罕见,但过去确实发生过。
这是一项安全功能。不要试图破坏它。让它发挥作用
如果您今天忽略它,分阶段更新将在几天后自动完成,您的系统将在几天后正常更新/升级,并且将不再有“保留”的软件包。
- 想要测试升级并报告问题的高级用户可以
apt -o APT::Get::Always-Include-Phased-Updates=true upgrade
立即升级并跳过分阶段。