为什么 apt full-upgrade 不能升级这个可升级包?

为什么 apt full-upgrade 不能升级这个可升级包?

当我apt update在 Debian 11 bullseye 安装上运行时(我还没有升级到 bookworm),其输出的最后显示:

1 package can be upgraded. Run 'apt list --upgradable' to see it

然后我运行apt full-upgrade -a,通常会升级所有软件包,但在这种情况下不会:

$ sudo apt full-upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

apt list --upgradable节目

$ sudo apt list --upgradable -a
Listing... Done
unifi/stable 7.5.176-22707-1 all [upgradable from: 7.4.162-21057-1]
unifi/now 7.4.162-21057-1 all [installed,upgradable to: 7.5.176-22707-1]

它是一个第三方包,但我不认为这有什么区别。

apt policy

$ apt policy unifi
unifi:
  Installed: 7.4.162-21057-1
  Candidate: 7.5.176-22707-1
  Version table:
     7.5.176-22707-1 500
        500 http://www.ubnt.com/downloads/unifi/debian stable/ubiquiti amd64 Packages
 *** 7.4.162-21057-1 100
        100 /var/lib/dpkg/status

包裹没有被扣留:

$ dpkg --get-selections | grep unifi
unifi                                           install

我确信我可以使用它来升级软件包apt install unifi,但我想知道为什么apt full-upgrade不升级它。

编辑:

如果我确实尝试升级,正如@AB 评论的那样,原因就变得很清楚了:

$ sudo apt install -d unifi
Reading package lists... Done
Building dependency tree... Done
Reading state information... 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:
 unifi : Depends: mongodb-server (>= 1:3.6.0) but 1:3.2.11-2+deb9u1 is to be installed or
                  mongodb-10gen (>= 3.6.0) but it is not installable or
                  mongodb-org-server (>= 3.6.0) but it is not installable
E: Unable to correct problems, you have held broken packages.

我有点希望apt full-upgrade告诉我包裹有问题,而不是只是默默地忽略它,但是哦,好吧。

答案1

事实证明,unifi 包的新版本依赖于比已安装的 Debian 版本中可用的更新版本的 mongodb:

$ sudo apt install -d unifi
Reading package lists... Done
Building dependency tree... Done
Reading state information... 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:
 unifi : Depends: mongodb-server (>= 1:3.6.0) but 1:3.2.11-2+deb9u1 is to be installed or
                  mongodb-10gen (>= 3.6.0) but it is not installable or
                  mongodb-org-server (>= 3.6.0) but it is not installable
E: Unable to correct problems, you have held broken packages.

相关内容