首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >升级“包已被保留”如何修复?(具体情况)

升级“包已被保留”如何修复?(具体情况)
EN

Ask Ubuntu用户
提问于 2022-03-28 20:16:48
回答 3查看 22.7K关注 0票数 11

在升级过程中,我有一个包裹被拒之门外:

代码语言:javascript
复制
$ sudo apt upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  mesa-opencl-icd:i386
0 to upgrade, 0 to newly install, 0 to remove and 1 not to upgrade.

运行apt list --upgradable之后,我看到:

“有另外两个版本。请使用'-a‘开关来查看它们。”

所以我运行apt list --upgradable -a,我看到:

代码语言:javascript
复制
Listing... Done
mesa-opencl-icd/focal-updates,focal-security 21.2.6-0ubuntu0.1~20.04.2 i386 [upgradable from: 21.0.3-0ubuntu0.3~20.04.5]
mesa-opencl-icd/now 21.0.3-0ubuntu0.3~20.04.5 i386 [installed,upgradable to: 21.2.6-0ubuntu0.1~20.04.2]
mesa-opencl-icd/focal 20.0.4-2ubuntu1 i386

在搜索之后,我看到了各种尝试修复这个问题的方法,但是它们涉及到sudo apt-get dist-upgrade,我相信这会导致问题。此外,sudo apt-get install ,但我不想强行安装的东西,我的系统是阻止我安装。

我更愿意找出发生这种情况的原因,并解决依赖关系或冲突的问题。

我在Xubuntu 20.04.4 LTS上

有人能建议如何最好地解决这个问题吗?

编辑,在sudo apt dist-upgrade之后没有结果

代码语言:javascript
复制
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following package was automatically installed and is no longer required:
  libclang-common-12-dev
Use 'sudo apt autoremove' to remove it.
The following packages have been kept back:
  mesa-opencl-icd:i386
0 to upgrade, 0 to newly install, 0 to remove and 1 not to upgrade.


$ sudo apt autoremove
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED
  libclang-common-12-dev
0 to upgrade, 0 to newly install, 1 to remove and 1 not to upgrade.
After this operation, 65.6 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 301137 files and directories currently installed.)
Removing libclang-common-12-dev (1:12.0.0-3ubuntu1~20.04.5) ...


$ sudo apt update
Hit:1 http://archive.canonical.com/ubuntu focal InRelease
Reading package lists... Done
Building dependency tree       
Reading state information... Done
2 packages can be upgraded. Run 'apt list --upgradable' to see them.


$ apt list --upgradable
Listing... Done
mesa-opencl-icd/focal-updates,focal-security 21.2.6-0ubuntu0.1~20.04.2 i386 [upgradable from: 21.0.3-0ubuntu0.3~20.04.5]
rsync/focal-updates,focal-security 3.1.3-8ubuntu0.3 amd64 [upgradable from: 3.1.3-8ubuntu0.2]


$ sudo apt upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  mesa-opencl-icd:i386
The following packages will be upgraded:
  rsync
1 to upgrade, 0 to newly install, 0 to remove and 1 not to upgrade.
1 standard security update
Need to get 318 kB of archives.
After this operation, 4,096 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://gb.archive.ubuntu.com/ubuntu focal-updates/main amd64 rsync amd64 3.1.3-8ubuntu0.3 [318 kB]
Fetched 318 kB in 0s (2,728 kB/s)
(Reading database ... 300703 files and directories currently installed.)
Preparing to unpack .../rsync_3.1.3-8ubuntu0.3_amd64.deb ...
Unpacking rsync (3.1.3-8ubuntu0.3) over (3.1.3-8ubuntu0.2) ...
Setting up rsync (3.1.3-8ubuntu0.3) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for systemd (245.4-4ubuntu3.15) ...


$ sudo apt update
Hit:1 http://ppa.launchpad.net/libretro/stable/ubuntu focal InRelease
Reading package lists... Done
Building dependency tree       
Reading state information... Done
1 package can be upgraded. Run 'apt list --upgradable' to see it.

$ sudo apt upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  mesa-opencl-icd:i386
0 to upgrade, 0 to newly install, 0 to remove and 1 not to upgrade.

$ sudo apt dist-upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  mesa-opencl-icd:i386
0 to upgrade, 0 to newly install, 0 to remove and 1 not to upgrade.
EN

回答 3

Ask Ubuntu用户

发布于 2022-09-01 16:53:03

在我的系统中,我也有多个保存的包裹。在我的例子中,包没有被更新(sudo apt-get dist-upgrade),因为更新是phased更新

分阶段更新是一个安全特性:并不是同时向所有用户介绍它们;只有一些用户在开始报告潜在问题(有关更多信息,请参见此答案。)时才会收到它们。

您可以通过运行PackageA来检查保存的apt-cache policy PackageA是否包含分阶段更新。分阶段更新按分阶段百分比显示在“版本表”中。

票数 19
EN

Ask Ubuntu用户

发布于 2022-08-03 10:24:14

这解决了我的问题:

代码语言:javascript
复制
sudo apt-get install aptitude 
sudo aptitude safe-upgrade
票数 18
EN

Ask Ubuntu用户

发布于 2023-03-15 00:31:03

您可以尝试使用已安装的现有工具。对我来说:

代码语言:javascript
复制
sudo apt full-upgrade
票数 0
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/1399734

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档