无人值守升级失败

无人值守升级失败

我已启用无人值守升级,但是由于某种原因,以下软件包未更新:

msodbcsql:amd64(13.1.9.2-1、17.0.1.1-1),mssql-tools:amd64(14.0.6.0-1、17.0.1.1-1)

我在 /etc/apt/apt.conf.d/50unattended-upgrades 中设置了以下配置:

    // Automatically upgrade packages from these (origin:archive) pairs
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";
//      "${distro_id}:${distro_codename}-proposed";
//      "${distro_id}:${distro_codename}-backports";
};

less /var/log/apt/history.log (最后手动完成 dist-upgrade):

  Start-Date: 2018-02-01  06:57:01
Commandline: /usr/bin/unattended-upgrade
Install: linux-image-4.4.0-1050-aws:amd64 (4.4.0-1050.59, automatic), linux-tools-4.4.0-1050-aws:amd64 (4.4.0-1050.59, automatic), linux-aws-tools-4.4.0-1050:amd64 (4.4.0-1050.59, automatic), linux-headers-4.4.0-1050-aws:amd64 (4.4.0-1050.59, automatic), linux-aws-headers-4.4.0-1050:amd64 (4.4.0-1050.59, automatic)
Upgrade: libcurl3:amd64 (7.47.0-1ubuntu2.5, 7.47.0-1ubuntu2.6), linux-headers-aws:amd64 (4.4.0.1049.51, 4.4.0.1050.52), linux-aws:amd64 (4.4.0.1049.51, 4.4.0.1050.52), linux-image-aws:amd64 (4.4.0.1049.51, 4.4.0.1050.52), linux-tools-aws:amd64 (4.4.0.1049.51, 4.4.0.1050.52), curl:amd64 (7.47.0-1ubuntu2.5, 7.47.0-1ubuntu2.6), libcurl3-gnutls:amd64 (7.47.0-1ubuntu2.5, 7.47.0-1ubuntu2.6)
End-Date: 2018-02-01  06:57:20

Start-Date: 2018-02-06  06:43:01
Commandline: /usr/bin/unattended-upgrade
Upgrade: libsystemd0:amd64 (229-4ubuntu21, 229-4ubuntu21.1), grub-common:amd64 (2.02~beta2-36ubuntu3.15, 2.02~beta2-36ubuntu3.16), grub2-common:amd64 (2.02~beta2-36ubuntu3.15, 2.02~beta2-36ubuntu3.16), udev:amd64 (229-4ubuntu21, 229-4ubuntu21.1), grub-pc:amd64 (2.02~beta2-36ubuntu3.15, 2.02~beta2-36ubuntu3.16), libudev1:amd64 (229-4ubuntu21, 229-4ubuntu21.1), grub-pc-bin:amd64 (2.02~beta2-36ubuntu3.15, 2.02~beta2-36ubuntu3.16), systemd-sysv:amd64 (229-4ubuntu21, 229-4ubuntu21.1), libpam-systemd:amd64 (229-4ubuntu21, 229-4ubuntu21.1), systemd:amd64 (229-4ubuntu21, 229-4ubuntu21.1)
End-Date: 2018-02-06  06:43:18

Start-Date: 2018-02-10  06:58:08
Commandline: /usr/bin/unattended-upgrade
Upgrade: libparted2:amd64 (3.2-15, 3.2-15ubuntu0.1), libapparmor1:amd64 (2.10.95-0ubuntu2.7, 2.10.95-0ubuntu2.8), libapparmor-perl:amd64 (2.10.95-0ubuntu2.7, 2.10.95-0ubuntu2.8), parted:amd64 (3.2-15, 3.2-15ubuntu0.1), sosreport:amd64 (3.4-1~ubuntu16.04.1, 3.5-1~ubuntu16.04.2), apparmor:amd64 (2.10.95-0ubuntu2.7, 2.10.95-0ubuntu2.8), cloud-guest-utils:amd64 (0.27-0ubuntu24, 0.27-0ubuntu25)
End-Date: 2018-02-10  06:58:12

Start-Date: 2018-02-12  13:11:28
Commandline: apt-get dist-upgrade
Upgrade: msodbcsql:amd64 (13.1.9.2-1, 17.0.1.1-1), mssql-tools:amd64 (14.0.6.0-1, 17.0.1.1-1)
End-Date: 2018-02-12  13:11:32

任何投入将不胜感激..

干杯

山姆

答案1

这些软件包msodbcsql不在mssql-toolsUbuntu 存储库中 – 您可以从其他地方获取它们。

由于该“其他地方”存储库未在您的 Allowed-Origins 中列出,因此这些软件包不会自动升级。

这里有一个很好的例子如何将非 Ubuntu 源添加到 Allowed-Origins。

对未来读者的安全警告:启用自动升级通常是不明智的全部来源。错误的升级可能会破坏您的系统。来自不同来源的良好升级可能会无意中引入文件冲突、版本冲突或其他有害问题。Ubuntu 的默认设置仅启用来自 Ubuntu 自己的安全存储库的安全升级,原因就在于此。

相关内容