You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Ubuntu 22.04中优先级更高的PPA版Firefox被Unattended-Upgrades静默替换为Snap版的原因问询

Ubuntu 22.04中优先级更高的PPA版Firefox被Unattended-Upgrades静默替换为Snap版的原因问询

我正在使用Ubuntu 22.04,Firefox是通过mozillateam PPA安装的。按照设置,我给PPA版Firefox设了1001的优先级,而Snap版Firefox是默认的500优先级。但今天自动更新(unattended-upgrades)居然把我的PPA版Firefox静默替换成了Snap版,我实在搞不懂为啥会这样。

我后来用apt-get remove firefox; apt-get install firefox重新装回了PPA版,这说明优先级设置本身应该是有效的,但自动更新好像没遵守这个规则。问题就出在这儿:为啥会这样?

下面是我的PPA版Firefox的优先级配置:

$ cat /etc/apt/preferences.d/mozilla-firefox
Package: *
Pin: release o=LP-PPA-mozillateam
Pin-Priority: 1001

重新安装后,当前的apt-cache policy firefox输出如下:

# apt-cache policy firefox
firefox:
  Installed: 120.0+build1-0ubuntu0.22.04.1~mt1
  Candidate: 120.0+build1-0ubuntu0.22.04.1~mt1
  Version table:
     1:1snap1-0ubuntu2 500
        500 http://de.archive.ubuntu.com/ubuntu jammy/main amd64 Packages
     *** 120.0+build1-0ubuntu0.22.04.1~mt1 1001
        1001 https://ppa.launchpadcontent.net/mozillateam/ppa/ubuntu jammy/main amd64 Packages
     100 /var/lib/dpkg/status

自动更新日志也证实了这件事:

$ grep 'Unpacking firefox' /var/log/unattended-upgrades/unattended-upgrades-dpkg.log
Unpacking firefox (1:1snap1-0ubuntu2) over (119.0.1+build1-0ubuntu0.22.04.1~mt1)

补充说明:之后我按照建议给Snap和snap-firefox都设了-1的优先级,问题应该是解决了,但我还是想弄明白:明明PPA版优先级更高(1001>500),为啥自动更新还是把它替换成了Snap版?

备注:内容来源于stack exchange,提问作者igel

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.21 08:39:36