我的unattended-upgrades不能升级。已经整整一个月了,它的日志是空的。
所以我手动检查了一下,确认它认为没有什么可升级的。
# unattended-upgrades --dry-run --debug
Initial blacklist :
Initial whitelist:
Starting unattended upgrades script
Allowed origins are: origin=Debian,codename=buster-updates, origin=Debian,codename=buster-proposed-updates, origin=Debian,codename=buster,label=Debian, origin=Debian,codename=buster,label=Debian-Security
Using (^linux-image-[0-9]+\.[0-9\.]+-.*|^linux-headers-[0-9]+\.[0-9\.]+-.*|^linux-image-extra-[0-9]+\.[0-9\.]+-.*|^linux-modules-[0-9]+\.[0-9\.]+-.*|^linux-modules-extra-[0-9]+\.[0-9\.]+-.*|^linux-signed-image-[0-9]+\.[0-9\.]+-.*|^linux-image-unsigned-[0-9]+\.[0-9\.]+-.*|^kfreebsd-image-[0-9]+\.[0-9\.]+-.*|^kfreebsd-headers-[0-9]+\.[0-9\.]+-.*|^gnumach-image-[0-9]+\.[0-9\.]+-.*|^.*-modules-[0-9]+\.[0-9\.]+-.*|^.*-kernel-[0-9]+\.[0-9\.]+-.*|^linux-backports-modules-.*-[0-9]+\.[0-9\.]+-.*|^linux-modules-.*-[0-9]+\.[0-9\.]+-.*|^linux-tools-[0-9]+\.[0-9\.]+-.*|^linux-cloud-tools-[0-9]+\.[0-9\.]+-.*|^linux-buildinfo-[0-9]+\.[0-9\.]+-.*|^linux-source-[0-9]+\.[0-9\.]+-.*) regexp to find kernel packages
Using (^linux-image-4\.19\.0\-10\-amd64$|^linux-headers-4\.19\.0\-10\-amd64$|^linux-image-extra-4\.19\.0\-10\-amd64$|^linux-modules-4\.19\.0\-10\-amd64$|^linux-modules-extra-4\.19\.0\-10\-amd64$|^linux-signed-image-4\.19\.0\-10\-amd64$|^linux-image-unsigned-4\.19\.0\-10\-amd64$|^kfreebsd-image-4\.19\.0\-10\-amd64$|^kfreebsd-headers-4\.19\.0\-10\-amd64$|^gnumach-image-4\.19\.0\-10\-amd64$|^.*-modules-4\.19\.0\-10\-amd64$|^.*-kernel-4\.19\.0\-10\-amd64$|^linux-backports-modules-.*-4\.19\.0\-10\-amd64$|^linux-modules-.*-4\.19\.0\-10\-amd64$|^linux-tools-4\.19\.0\-10\-amd64$|^linux-cloud-tools-4\.19\.0\-10\-amd64$|^linux-buildinfo-4\.19\.0\-10\-amd64$|^linux-source-4\.19\.0\-10\-amd64$) regexp to find running kernel packages
Checking: nginx ([])
adjusting candidate version: nginx=1.14.2-2+deb10u2
pkgs that look like they should be upgraded:
Fetched 0 B in 0s (0 B/s)
fetch.run() result: 0
blacklist: []
whitelist: []
No packages found that can be upgraded unattended and no pending auto-removals# apt-get upgrade --dry-run
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
nginx
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Inst nginx [1.16.1-1~buster] (1.18.0-1~buster nginx:10.0/stable [amd64])
Conf nginx (1.18.0-1~buster nginx:10.0/stable [amd64])在运行apt-get update之后,我再次尝试,结果是不同的。
# unattended-upgrades --dry-run --debug
…
Checking: bind9-host ([])
Checking: dnsutils ([])
Checking: libbind9-161 ([])
Checking: libdns-export1104 ([])
Checking: libdns1104 ([])
Checking: libirs161 ([])
Checking: libisc-export1100 ([])
Checking: libisc1100 ([])
Checking: libisccc161 ([])
Checking: libisccfg163 ([])
Checking: liblwres161 ([])
Checking: nginx ([])
adjusting candidate version: nginx=1.14.2-2+deb10u3
pkgs that look like they should be upgraded: bind9-host
dnsutils
libbind9-161
libdns-export1104
libdns1104
libirs161
libisc-export1100
libisc1100
libisccc161
libisccfg163
liblwres161
…
Option --dry-run given, *not* performing real actions
Packages that will be upgraded: bind9-host dnsutils libbind9-161 libdns-export1104 libdns1104 libirs161 libisc-export1100 libisc1100 libisccc161 libisccfg163 liblwres161
…
All upgrades installed
InstCount=0 DelCount=0 BrokenCount=0# apt-get upgrade --dry-run
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
bind9-host dnsutils libbind9-161 libdns-export1104 libdns1104 libirs161 libisc-export1100 libisc1100 libisccc161 libisccfg163 liblwres161 nginx
12 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Inst dnsutils [1:9.11.5.P4+dfsg-5.1+deb10u1] (1:9.11.5.P4+dfsg-5.1+deb10u2 Debian-Security:10/stable [amd64]) []
Inst bind9-host [1:9.11.5.P4+dfsg-5.1+deb10u1] (1:9.11.5.P4+dfsg-5.1+deb10u2 Debian-Security:10/stable [amd64]) []
Inst libbind9-161 [1:9.11.5.P4+dfsg-5.1+deb10u1] (1:9.11.5.P4+dfsg-5.1+deb10u2 Debian-Security:10/stable [amd64]) []
Inst libisccfg163 [1:9.11.5.P4+dfsg-5.1+deb10u1] (1:9.11.5.P4+dfsg-5.1+deb10u2 Debian-Security:10/stable [amd64]) []
Inst libisccc161 [1:9.11.5.P4+dfsg-5.1+deb10u1] (1:9.11.5.P4+dfsg-5.1+deb10u2 Debian-Security:10/stable [amd64]) []
Inst libirs161 [1:9.11.5.P4+dfsg-5.1+deb10u1] (1:9.11.5.P4+dfsg-5.1+deb10u2 Debian-Security:10/stable [amd64]) []
Inst libdns1104 [1:9.11.5.P4+dfsg-5.1+deb10u1] (1:9.11.5.P4+dfsg-5.1+deb10u2 Debian-Security:10/stable [amd64]) []
Inst libisc1100 [1:9.11.5.P4+dfsg-5.1+deb10u1] (1:9.11.5.P4+dfsg-5.1+deb10u2 Debian-Security:10/stable [amd64]) []
Inst liblwres161 [1:9.11.5.P4+dfsg-5.1+deb10u1] (1:9.11.5.P4+dfsg-5.1+deb10u2 Debian-Security:10/stable [amd64])
Inst libisc-export1100 [1:9.11.5.P4+dfsg-5.1+deb10u1] (1:9.11.5.P4+dfsg-5.1+deb10u2 Debian-Security:10/stable [amd64])
Inst libdns-export1104 [1:9.11.5.P4+dfsg-5.1+deb10u1] (1:9.11.5.P4+dfsg-5.1+deb10u2 Debian-Security:10/stable [amd64])
Inst nginx [1.16.1-1~buster] (1.18.0-1~buster nginx:10.0/stable [amd64])
Conf dnsutils (1:9.11.5.P4+dfsg-5.1+deb10u2 Debian-Security:10/stable [amd64])
Conf bind9-host (1:9.11.5.P4+dfsg-5.1+deb10u2 Debian-Security:10/stable [amd64])
Conf libbind9-161 (1:9.11.5.P4+dfsg-5.1+deb10u2 Debian-Security:10/stable [amd64])
Conf libisccfg163 (1:9.11.5.P4+dfsg-5.1+deb10u2 Debian-Security:10/stable [amd64])
Conf libisccc161 (1:9.11.5.P4+dfsg-5.1+deb10u2 Debian-Security:10/stable [amd64])
Conf libirs161 (1:9.11.5.P4+dfsg-5.1+deb10u2 Debian-Security:10/stable [amd64])
Conf libdns1104 (1:9.11.5.P4+dfsg-5.1+deb10u2 Debian-Security:10/stable [amd64])
Conf libisc1100 (1:9.11.5.P4+dfsg-5.1+deb10u2 Debian-Security:10/stable [amd64])
Conf liblwres161 (1:9.11.5.P4+dfsg-5.1+deb10u2 Debian-Security:10/stable [amd64])
Conf libisc-export1100 (1:9.11.5.P4+dfsg-5.1+deb10u2 Debian-Security:10/stable [amd64])
Conf libdns-export1104 (1:9.11.5.P4+dfsg-5.1+deb10u2 Debian-Security:10/stable [amd64])
Conf nginx (1.18.0-1~buster nginx:10.0/stable [amd64])我相信在计算升级之前更新包列表是一个给定的,应该是自动发生的。我漏掉了什么明显的东西吗?我所读的教程只提到了在安装apt-get update之前的unattended-upgrades,而专门搜索对此帮助不大。
发布于 2020-09-10 12:54:44
要更新包列表,需要在apt配置中设置:
APT::Periodic::Update-Package-Lists "1";Debian wiki建议创建一个文件/etc/apt/apt.conf.d/20auto-upgrades来激活无人值守的升级,包括:
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Unattended-Upgrade "1";https://serverfault.com/questions/1033339
复制相似问题