Debian

Debian 上的 apt 軟體包管理器將軟體包列為可升級但不升級

  • September 11, 2018

這個問題類似於Debian Linux 不更新包,但在我的情況下,較新的包不是來自backports

§ apt list --upgradable
Listing... Done
firefox-esr-l10n-en-gb/stable 60.2.0esr-1~deb9u2 all [upgradable from: 52.9.0esr-1~deb9u1]
N: There is 1 additional version. Please use the '-a' switch to see it

§ sudo apt 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 policy firefox-esr-l10n-en-gb
firefox-esr-l10n-en-gb:
 Installed: 52.9.0esr-1~deb9u1
 Candidate: 60.2.0esr-1~deb9u2
 Version table:
    60.2.0esr-1~deb9u2 500
       500 http://security.debian.org stretch/updates/main amd64 Packages
*** 52.9.0esr-1~deb9u1 500
       500 http://ftp.fr.debian.org/debian stretch/main amd64 Packages
       500 http://security.debian.org stretch/updates/main amd64 Packages
       100 /var/lib/dpkg/status

§ apt policy firefox-esr
firefox-esr:
 Installed: 52.9.0esr-1~deb9u1
 Candidate: 52.9.0esr-1~deb9u1
 Version table:
    60.2.0esr-1~deb9u2 500
       500 http://security.debian.org stretch/updates/main amd64 Packages
*** 52.9.0esr-1~deb9u1 30000
       500 http://ftp.fr.debian.org/debian stretch/main amd64 Packages
       100 /var/lib/dpkg/status

§ apt -s install firefox-esr=60.2.0esr-1~deb9u2
NOTE: This is only a simulation!
     apt needs root privileges for real execution.
     Keep also in mind that locking is deactivated,
     so don't depend on the relevance to the real current situation!
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
 firefox-esr-l10n-en-gb
Suggested packages:
 fonts-stix | otf-stix
The following packages will be upgraded:
 firefox-esr firefox-esr-l10n-en-gb
2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Inst firefox-esr-l10n-en-gb [52.9.0esr-1~deb9u1] (60.2.0esr-1~deb9u2 Debian-Security:9/stable [all]) []
Inst firefox-esr [52.9.0esr-1~deb9u1] (60.2.0esr-1~deb9u2 Debian-Security:9/stable [amd64])
Conf firefox-esr-l10n-en-gb (60.2.0esr-1~deb9u2 Debian-Security:9/stable [all])
Conf firefox-esr (60.2.0esr-1~deb9u2 Debian-Security:9/stable [amd64])

這是什麼意思?為什麼firefox-esr不升級?


更新

在 Stephen Kitt 的回答之後,我發現了一個文件/etc/apt/preferences.d/apt-listbugs,這是我今天早上執行升級時創建的,內容如下:

Explanation: Pinned by apt-listbugs at 2018-09-11 08:11:30 +0200
Explanation:   #908396: firefox-esr: stopped working after upgrade from 59 to 60
Explanation:   #908449: (no subject)
Package: firefox-esr
Pin: version 52.9.0esr-1~deb9u1
Pin-Priority: 30000

這是什麼意思?

您已firefox-esr以非常高的優先級固定到目前安裝的版本:

*** 52.9.0esr-1~deb9u1 30000

這可以防止安裝任何其他具有較低 pin 優先級的版本,包括只有優先級 500 的安全更新:

    60.2.0esr-1~deb9u2 500

該圖釘來自apt-listbugs:它決定(或被告知——我認為它總是詢問,但可能有一些配置沒有)應該暫停升級到 Firefox 60,直到錯誤908396908449得到修復。這些錯誤與 SSE2 指令的新要求有關i386;由於您正在執行amd64,因此它們與您無關,並且您升級應該是安全的。

您需要刪除 pin 優先級才能繼續升級。刪除/etc/apt/preferences.d/apt-listbugs,如果apt-listbugs再次詢問您,請告訴它您確實要升級。

引用自:https://unix.stackexchange.com/questions/468200