我运行了 apt-get upgrade 并找到了一个保留的包。
bitnami@ip-xxxxx-xx-xxx:/etc/apt/sources.list.d$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
mongodb-org-tools
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
按照此关联在对“--with-new-pkgs-upgrade”的功能有了基本了解之后,我运行了以下命令:
bitnami@ip-xxxxx-xx-xxx:/etc/apt/sources.list.d$ sudo apt-get --with-new-pkgs upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
但是,当我再次运行常规的“apt-get upgrade”时,我仍然会看到列出的保留的软件包。
bitnami@ip-xxxxx-xx-xxx:/etc/apt/sources.list.d$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
mongodb-org-tools
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
我引用的链接还在其中一条评论中提供了故障排除步骤:
我运行了该步骤,发现它没有执行任何操作并报告 0 未升级:
sudo apt-get install mongodb-org-tools
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
mongodb-org-tools
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
我仍然看到保留的软件包。“--with-new-pkgs”有什么好处吗?在这种情况下如何解决保留软件包的问题?