无人值守升级永远无法工作

无人值守升级永远无法工作

我已经安装并配置了无人值守升级,但每次运行 apt-get upgrade 时,我仍然看到有新的软件包等待安装。我甚至等了 2 周才让它们自动安装,但这种情况从未发生过。

这是我的配置文件:

/etc/apt/apt.conf.d/50unattended-upgrades

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";
};

/etc/apt/apt.conf.d/20auto-upgrades

APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Unattended-Upgrade "1";

ls -l /var/lib/apt/periodic/

total 0

uname -a

Linux 2.6.32-openvz-042stab120.18-amd64 #1 SMP Fri Jan 13 10:33:34 MSK 2017 i686 i686 i686 GNU/Linux

cat /etc/lsb-release

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.5 LTS"

(这是一个服务器)

sudo apt-get 安装无人值守升级

Reading package lists... Done
Building dependency tree       
Reading state information... Done
unattended-upgrades is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.

如您所见,有 4 个包需要升级,但无人值守升级没有执行任何操作。

sudo apt-get——模拟升级

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  libssl-dev libssl-doc libssl1.0.0 openssl
4 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Inst libssl-doc [1.0.1f-1ubuntu2.26] (1.0.1f-1ubuntu2.27 Ubuntu:14.04/trusty-security [all])
Inst libssl-dev [1.0.1f-1ubuntu2.26] (1.0.1f-1ubuntu2.27 Ubuntu:14.04/trusty-security [i386]) []
Inst libssl1.0.0 [1.0.1f-1ubuntu2.26] (1.0.1f-1ubuntu2.27 Ubuntu:14.04/trusty-security [i386])
Inst openssl [1.0.1f-1ubuntu2.26] (1.0.1f-1ubuntu2.27 Ubuntu:14.04/trusty-security [i386])
Conf libssl-doc (1.0.1f-1ubuntu2.27 Ubuntu:14.04/trusty-security [all])
Conf libssl1.0.0 (1.0.1f-1ubuntu2.27 Ubuntu:14.04/trusty-security [i386])
Conf libssl-dev (1.0.1f-1ubuntu2.27 Ubuntu:14.04/trusty-security [i386])
Conf openssl (1.0.1f-1ubuntu2.27 Ubuntu:14.04/trusty-security [i386])

相关内容