剩下的 12 个可升级包怎么办?

剩下的 12 个可升级包怎么办?

因此,昨天晚上,我运行了一个命令apt update,报告说有 15 个软件包可以升级。我apt upgrade立即发出命令并开始升级软件包

docker-ce ffmpeg libavcodec57 libavcodec57:i386 libavdevice57 libavfilter6 libavformat57 libavresample3 libavresample3:i386
libavutil55 libavutil55:i386 libpostproc54 libswresample2 libswresample2:i386 libswscale4

当时网络连接似乎很慢,所以我决定跳过下载大包(docker),而决定只安装/升级libavutil55已经下载的包。

安装完成后,我就睡着了。今天早上醒来,我决定升级其余的,因为互联网连接似乎很稳定。但没想到,apt 现在只在升级docker-ce,没有其他的。

下面是命令的记录;alias使用的命令是:

ad='sudo apt update'
ag='sudo apt upgrade'
ai='sudo apt install'

┌┤✅├─┤ hjpotter92 ├─┤~│
└┴─ ⚡[▶▶▶▶▶▶▶▶▶▶] ┴─ ➜ ad
Hit:1 http://apt.postgresql.org/pub/repos/apt stretch-pgdg InRelease
Hit:2 https://deb.nodesource.com/node_8.x stretch InRelease
Hit:3 https://packagecloud.io/slacktechnologies/slack/debian jessie InRelease
Ign:4 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:5 http://security.debian.org/debian-security stretch/updates InRelease
Hit:6 http://dl.google.com/linux/chrome/deb stable Release
Hit:7 http://linux.teamviewer.com/deb stable InRelease
Hit:9 http://linux.teamviewer.com/deb preview InRelease
Hit:10 http://repo.steampowered.com/steam precise InRelease
Ign:11 http://debianmirror.nkn.in/debian stretch InRelease
Hit:12 http://debianmirror.nkn.in/debian stretch-updates InRelease
Hit:13 https://repo.skype.com/deb stable InRelease
Hit:14 http://debianmirror.nkn.in/debian stretch-backports InRelease
Hit:15 http://debianmirror.nkn.in/debian stretch Release
Get:17 https://download.docker.com/linux/debian stretch InRelease [39.1 kB]
Hit:18 https://dl.yarnpkg.com/debian stable InRelease
Fetched 39.1 kB in 8s (4,542 B/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
15 packages can be upgraded. Run 'apt list --upgradable' to see them.
┌┤✅├─┤ hjpotter92 ├─┤~│
└┴─ ⚡[▶▶▶▶▶▶▶▶▶▶] ┴─ ➜ au
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  docker-ce ffmpeg libavcodec57 libavcodec57:i386 libavdevice57 libavfilter6 libavformat57 libavresample3 libavresample3:i386
  libavutil55 libavutil55:i386 libpostproc54 libswresample2 libswresample2:i386 libswscale4
15 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 53.5 MB of archives.
After this operation, 16.3 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://security.debian.org/debian-security stretch/updates/main amd64 libavutil55 amd64 7:3.2.11-1~deb9u1 [218 kB]
Get:2 https://download.docker.com/linux/debian stretch/stable amd64 docker-ce amd64 18.06.0~ce~3-0~debian [40.1 MB]
Get:3 http://security.debian.org/debian-security stretch/updates/main i386 libavutil55 i386 7:3.2.11-1~deb9u1 [236 kB]
Get:4 http://security.debian.org/debian-security stretch/updates/main amd64 libswresample2 amd64 7:3.2.11-1~deb9u1 [98.0 kB]
Get:5 http://security.debian.org/debian-security stretch/updates/main i386 libswresample2 i386 7:3.2.11-1~deb9u1 [103 kB]
Get:6 http://security.debian.org/debian-security stretch/updates/main i386 libavcodec57 i386 7:3.2.11-1~deb9u1 [4,432 kB]
12% [2 docker-ce 1,810 kB/40.1 MB 5%] [6 libavcodec57:i386 1,710 kB/4,432 kB 39%]                                  49.8 kB/s 16min 31s^C
┌┤✘ ├─┤ hjpotter92 ├─┤~│
└┴─ ⚡[▶▶▶▶▶▶▶▶▶▶] ┴─ ➜ ai libavutil55
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  libavutil55:i386
The following packages will be upgraded:
  libavutil55 libavutil55:i386
2 upgraded, 0 newly installed, 0 to remove and 13 not upgraded.
Need to get 0 B/454 kB of archives.
After this operation, 4,096 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Reading changelogs... Done
(Reading database ... 322125 files and directories currently installed.)
Preparing to unpack .../libavutil55_7%3a3.2.11-1~deb9u1_i386.deb ...
De-configuring libavutil55:amd64 (7:3.2.10-1~deb9u1) ...
Unpacking libavutil55:i386 (7:3.2.11-1~deb9u1) over (7:3.2.10-1~deb9u1) ...
Preparing to unpack .../libavutil55_7%3a3.2.11-1~deb9u1_amd64.deb ...
Unpacking libavutil55:amd64 (7:3.2.11-1~deb9u1) over (7:3.2.10-1~deb9u1) ...
Setting up libavutil55:amd64 (7:3.2.11-1~deb9u1) ...
Setting up libavutil55:i386 (7:3.2.11-1~deb9u1) ...
Processing triggers for libc-bin (2.24-11+deb9u3) ...
┌┤✅├─┤ hjpotter92 ├─┤~│
└┴─ ⚡[▶▶▶▶▶▶▶▶▶▶] ┴─ ➜ au
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  docker-ce
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 40.1 MB of archives.
After this operation, 16.3 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 https://download.docker.com/linux/debian stretch/stable amd64 docker-ce amd64 18.06.0~ce~3-0~debian [40.1 MB]
Fetched 40.1 MB in 1min 39s (405 kB/s)
Reading changelogs... Done
(Reading database ... 322125 files and directories currently installed.)
Preparing to unpack .../docker-ce_18.06.0~ce~3-0~debian_amd64.deb ...
Unpacking docker-ce (18.06.0~ce~3-0~debian) over (18.03.1~ce-0~debian) ...
Setting up docker-ce (18.06.0~ce~3-0~debian) ...
Processing triggers for systemd (232-25+deb9u4) ...
Processing triggers for man-db (2.7.6.1-2) ...
┌┤✅├─┤ hjpotter92 ├─┤~│
└┴─ ⚡[▶▶▶▶▶▶▶▶▶▶] ┴─ ➜ ad
Ign:1 http://debianmirror.nkn.in/debian stretch InRelease
Ign:2 http://dl.google.com/linux/chrome/deb stable InRelease
Get:3 http://security.debian.org/debian-security stretch/updates InRelease [94.3 kB]
Get:4 http://debianmirror.nkn.in/debian stretch-updates InRelease [91.0 kB]
Hit:5 http://dl.google.com/linux/chrome/deb stable Release
Hit:7 http://linux.teamviewer.com/deb stable InRelease
Hit:8 http://repo.steampowered.com/steam precise InRelease
Hit:9 https://download.docker.com/linux/debian stretch InRelease
Hit:10 https://deb.nodesource.com/node_8.x stretch InRelease
Hit:11 http://linux.teamviewer.com/deb preview InRelease
Hit:12 https://dl.yarnpkg.com/debian stable InRelease
Hit:13 https://repo.skype.com/deb stable InRelease
Hit:14 http://apt.postgresql.org/pub/repos/apt stretch-pgdg InRelease
Get:16 http://debianmirror.nkn.in/debian stretch-backports InRelease [91.8 kB]
Hit:17 http://debianmirror.nkn.in/debian stretch Release
Get:18 http://debianmirror.nkn.in/debian stretch-backports/main amd64 Packages.diff/Index [27.8 kB]
Hit:15 https://packagecloud.io/slacktechnologies/slack/debian jessie InRelease
Get:20 http://debianmirror.nkn.in/debian stretch-backports/main i386 Packages.diff/Index [27.8 kB]
Get:21 http://debianmirror.nkn.in/debian stretch-backports/main amd64 Packages 2018-07-19-2007.59.pdiff [217 B]
Get:21 http://debianmirror.nkn.in/debian stretch-backports/main amd64 Packages 2018-07-19-2007.59.pdiff [217 B]
Get:22 http://debianmirror.nkn.in/debian stretch-backports/main i386 Packages 2018-07-19-2007.59.pdiff [464 B]
Get:23 http://debianmirror.nkn.in/debian stretch-backports/main i386 Packages 2018-07-20-0209.59.pdiff [216 B]
Get:23 http://debianmirror.nkn.in/debian stretch-backports/main i386 Packages 2018-07-20-0209.59.pdiff [216 B]
Fetched 334 kB in 4s (71.6 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
┌┤✅├─┤ hjpotter92 ├─┤~│
└┴─ ⚡[▶▶▶▶▶▶▶▶▶▶] ┴─ ➜ au
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

剩下的包裹怎么样了?

答案1

很可能unattended-upgrades升级了大部分软件包。

docker-ce没有自动升级,因为默认情况下,来自第三方存储库的软件包不会自动升级。

对于许多最新的无人值守升级,请参阅文件/var/log/unattended-upgrades/unattended-upgrades-dpkg.log

答案2

正如@Deltik 所提到的,docker 是一个第三方存储库。我刚刚遇到了同样的问题,并找到了如何轻松添加您在机器上使用的任何存储库的方法。

首先输入以下命令:

apt-cache policy

这将为您提供 Debian 安装中使用的所有不同存储库的列表。例如,Docker 将在 Debian 9 (Stretch) 下显示如下行

500 https://download.docker.com/linux/debian stretch/stable amd64 Packages release 
o=Docker,a=stretch,l=Docker CE,c=stable,b=amd64 origin download.docker.com

将以下部分复制到位于的 UnattendedUpgrades 配置文件中,/etc/apt/apt.conf.d/50unattended-upgrades并将其放入部分中Unattended-Upgrade::Origins-Pattern:(请确保省略该b参数,因为它不受支持)

"o=Docker,a=stretch,l=Docker CE,c=stable";

要检查一切是否按预期工作,请使用以下命令来调试您的配置:

unattended-upgrade -d

如果没有错误,则所有软件包都会被升级,或者会显示一条消息告诉您没有需要升级的软件包。

相关内容