Apt

為什麼不考慮 PPA 包?

  • January 13, 2017

我添加了官方的 Firefox-next PPA:

sudo add-apt-repository ppa:mozillateam/firefox-next
sudo apt-get update
sudo apt-get upgrade

所以我在/etc/apt/sources.list.d/mozillateam-firefox-next-xenial.list中得到以下配置

deb http://ppa.launchpad.net/mozillateam/firefox-next/ubuntu xenial main

但該軟體包不會升級到 PPA 版本。

問題

我該如何解決?

政策(之前)

$ apt policy firefox
firefox:
 Installed: 48.0+linuxmint1+sarah
 Candidate: 48.0+linuxmint1+sarah
 Version table:
    49.0~b2+build1-0ubuntu0.16.04.1 500
       500 http://ppa.launchpad.net/mozillateam/firefox-next/ubuntu xenial/main amd64 Packages
*** 48.0+linuxmint1+sarah 700
       700 http://mint-mirror.gwendallebihan.net/packages sarah/upstream amd64 Packages
       100 /var/lib/dpkg/status
    48.0+build2-0ubuntu0.16.04.1 500
       500 http://ftp.u-picardie.fr/mirror/ubuntu/ubuntu xenial-updates/main amd64 Packages
       500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages
    45.0.2+build1-0ubuntu1 500
       500 http://ftp.u-picardie.fr/mirror/ubuntu/ubuntu xenial/main amd64 Packages

APT 政策

$ cat /etc/apt/preferences.d/official-extra-repositories.pref
Package: *
Pin: origin build.linuxmint.com
Pin-Priority: 700

解決方案

基於如何從 PPA 中挑選包? 添加以下規則以/etc/apt/preferences.d/official-extra-repositories.pref優先處理 PPA(Pin-Priority將使用最高的):

Package: *firefox*
Pin: release o=LP-PPA-mozillateam-firefox-next
Pin-Priority: 800

然後更新升級

sudo apt-get update
sudo apt-get upgrade

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