Ubuntu 18.04 中的 Firefox 有一个特殊补丁来启用全局菜单,该版本在后续版本中被删除。我想在 20.04 中安装该版本。一种方法是获取 .deb 文件并运行sudo apt-mark hold firefox
。但是,当新版本发布时,我将不得不手动应用更新。
有没有办法配置apt
,以便只有 Firefox 才会从 18.04 存储库安装(和更新),而所有其他软件都从 20.04 存储库安装?
(尽管全局菜单补丁在 Unity 停止使用时被删除,但由于 KDE Plasma 的全局菜单功能,全局菜单仍然非常活跃)。
答案1
添加/etc/apt/sources.list.d/
仿生源,这样删除起来会更容易。为此,请创建/etc/apt/sources.list.d/bionic.list
包含以下内容的文件。
deb http://archive.ubuntu.com/ubuntu/ bionic main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ bionic-updates main restricted universe multiverse
创造/etc/apt/preferences.d/bionic.pref
#preference for firefox from bionic
Explanation: Allow installing firefox from bionic
Package: firefox
Pin: release a=bionic-updates
Pin-Priority: 1101
Explanation: Avoid other packages from the bionic repo.
Package: *
Pin: release a=bionic
Pin-Priority: 1
与..一起处理
sudo apt update
第一次模拟,因为我不知道你的系统中是否包含一些 ppa。
apt -s full-upgrade
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
Calculating upgrade... Done
The following packages will be DOWNGRADED:
firefox
0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 0 not upgraded.
Inst firefox [84.0+build3-0ubuntu0.20.04.1] (84.0+build3-0ubuntu0.18.04.1 Ubuntu:18.04/bionic [amd64])
Conf firefox (84.0+build3-0ubuntu0.18.04.1 Ubuntu:18.04/bionic [amd64])
然后sudo apt full-upgrade
从 Ubuntu 18.04 运行安装 Firefox。