我已经根据配置了无人值守升级这指导。
配置文件如下:
/etc/apt/apt.conf.d/50unattended-upgrades
// Automatically upgrade packages from these (origin:archive) pairs
//
// Note that in Ubuntu security updates may pull in new dependencies
// from non-security sources (e.g. chromium). By allowing the release
// pocket these get automatically pulled in.
Unattended-Upgrade::Allowed-Origins {
"${distro_id}:${distro_codename}";
"${distro_id}:${distro_codename}-security";
// Extended Security Maintenance; doesn't necessarily exist for
// every release and this system may not have it installed, but if
// available, the policy for updates is such that unattended-upgrades
// should also install from here by default.
"${distro_id}ESM:${distro_codename}";
"${distro_id}:${distro_codename}-updates"; // uncommented 27/06/2019
// "${distro_id}:${distro_codename}-proposed";
// "${distro_id}:${distro_codename}-backports";
};
/etc/apt/apt.conf.d/20auto-upgrades
:
// APT::Periodic::Update-Package-Lists "1";
// APT::Periodic::Unattended-Upgrade "1";
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Download-Upgradeable-Packages "1";
APT::Periodic::AutocleanInterval "30";
APT::Periodic::Unattended-Upgrade "1";
允许的来源为(来自/var/log/unattended-upgrades/unattended-upgrades.log
:):
2019-07-12 09:59:34,126 INFO Allowed origins are: o=Ubuntu,a=bionic, o=Ubuntu,a=bionic-security, o=UbuntuESM,a=bionic, o=Ubuntu,a=bionic-updates
但是,软件更新程序不断要求我确认一些软件更新。如下所示:
我认为这unattended-upgrades
也能解决这些更新问题。
对于需要通过 GUI 确认的更新,我是否还缺少某个配置?
答案1
可能的原因有多种。幸运的是,没有一个表明存在真正的问题。
首先,对于大多数人来说,无人值守升级会从 /etc/apt/apt.conf.d/50unattended-upgrades 中列入白名单的有限数量的存储库中提取。无人值守升级会忽略来自其他存储库、PPA、其他来源或 Snap 的任何软件,并将显示在桌面的软件更新程序通知中。
(就您而言,您已经将另一个存储库添加到白名单。做得好!)
其次,桌面软件更新程序工具和无人值守升级不协调 - 每天的运行时间都不同。您向我们展示的情况很可能只是软件更新程序恰好在某一天先运行。
对于大多数人来说,避免混淆的最简单方法是更改“软件和更新”控制面板中的“软件更新程序”频率。查找“更新”选项卡,然后选择“当有其他更新时”选项。降低频率。
- 如何使用 gsettings 控制软件更新程序的计划
- 如何控制系统定时器用于无人值守升级(apt-daily.service 和 apt-daily-upgrade.service