我经常运行sudo apt update
,然后sudo apt upgrade
运行。通常它运行没有问题,但是这次在更新一些 Linux 头文件的过程中进度卡在了 79%。我应该如何安全地继续?
我尝试用 杀死它Crtl+C
,但是它忽略了信号。
更新:我曾经kill
杀死 apt,然后运行sudo dpkg --configure -a
来解决问题。
$ sudo apt upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following NEW packages will be installed:
linux-headers-4.15.0-44 linux-headers-4.15.0-44-generic
linux-image-4.15.0-44-generic linux-modules-4.15.0-44-generic
linux-modules-extra-4.15.0-44-generic linux-tools-4.15.0-44
linux-tools-4.15.0-44-generic
The following packages will be upgraded:
gir1.2-totem-1.0 gnome-shell-extension-ubuntu-dock google-chrome-stable
libasound2 libasound2:i386 libasound2-data libasound2-dev libtotem0
linux-generic linux-headers-generic linux-image-generic linux-libc-dev
linux-signed-generic linux-tools-common linux-tools-virtual totem
totem-common totem-plugins
18 upgraded, 7 newly installed, 0 to remove and 0 not upgraded.
Need to get 130 MB of archives.
After this operation, 357 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libasound2 amd64 1.1.3-5ubuntu0.2 [359 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu bionic-updates/main i386 libasound2 i386 1.1.3-5ubuntu0.2 [382 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libasound2-dev amd64 1.1.3-5ubuntu0.2 [123 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libasound2-data all 1.1.3-5ubuntu0.2 [36.5 kB]
Get:5 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libtotem0 amd64 3.26.0-0ubuntu6.2 [154 kB]
Get:6 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 totem-plugins amd64 3.26.0-0ubuntu6.2 [140 kB]
Get:7 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 totem amd64 3.26.0-0ubuntu6.2 [85.5 kB]
Get:8 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 totem-common all 3.26.0-0ubuntu6.2 [139 kB]
Get:9 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 gir1.2-totem-1.0 amd64 3.26.0-0ubuntu6.2 [5,188 B]
Get:10 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 gnome-shell-extension-ubuntu-dock all 0.9.1ubuntu18.04.3 [68.9 kB]
Get:11 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 linux-modules-4.15.0-44-generic amd64 4.15.0-44.47 [13.0 MB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 linux-image-4.15.0-44-generic amd64 4.15.0-44.47 [7,905 kB]
Get:13 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 linux-modules-extra-4.15.0-44-generic amd64 4.15.0-44.47 [32.8 MB]
Get:14 http://dl.google.com/linux/chrome/deb stable/main amd64 google-chrome-stable amd64 72.0.3626.81-1 [57.3 MB]
Get:15 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 linux-generic amd64 4.15.0.44.46 [1,860 B]
Get:16 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 linux-image-generic amd64 4.15.0.44.46 [2,380 B]
Get:17 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 linux-headers-4.15.0-44 all 4.15.0-44.47 [11.0 MB]
Get:18 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 linux-headers-4.15.0-44-generic amd64 4.15.0-44.47 [1,118 kB]
Get:19 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 linux-headers-generic amd64 4.15.0.44.46 [2,344 B]
Get:20 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 linux-libc-dev amd64 4.15.0-44.47 [1,013 kB]
Get:21 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 linux-signed-generic amd64 4.15.0.44.46 [1,892 B]
Get:22 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 linux-tools-common all 4.15.0-44.47 [174 kB]
Get:23 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 linux-tools-4.15.0-44 amd64 4.15.0-44.47 [4,615 kB]
Get:24 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 linux-tools-4.15.0-44-generic amd64 4.15.0-44.47 [1,960 B]
Get:25 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 linux-tools-virtual amd64 4.15.0.44.46 [2,368 B]
Fetched 130 MB in 30s (4,339 kB/s)
(Reading database ... 328506 files and directories currently installed.)
Preparing to unpack .../00-libasound2_1.1.3-5ubuntu0.2_i386.deb ...
De-configuring libasound2:amd64 (1.1.3-5ubuntu0.1) ...
Unpacking libasound2:i386 (1.1.3-5ubuntu0.2) over (1.1.3-5ubuntu0.1) ...
Preparing to unpack .../01-libasound2_1.1.3-5ubuntu0.2_amd64.deb ...
Unpacking libasound2:amd64 (1.1.3-5ubuntu0.2) over (1.1.3-5ubuntu0.1) ...
Preparing to unpack .../02-libasound2-dev_1.1.3-5ubuntu0.2_amd64.deb ...
Unpacking libasound2-dev:amd64 (1.1.3-5ubuntu0.2) over (1.1.3-5ubuntu0.1) ...
Preparing to unpack .../03-libasound2-data_1.1.3-5ubuntu0.2_all.deb ...
Unpacking libasound2-data (1.1.3-5ubuntu0.2) over (1.1.3-5ubuntu0.1) ...
Preparing to unpack .../04-google-chrome-stable_72.0.3626.81-1_amd64.deb ...
Unpacking google-chrome-stable (72.0.3626.81-1) over (71.0.3578.98-1) ...
Preparing to unpack .../05-libtotem0_3.26.0-0ubuntu6.2_amd64.deb ...
Unpacking libtotem0:amd64 (3.26.0-0ubuntu6.2) over (3.26.0-0ubuntu6.1) ...
Preparing to unpack .../06-totem-plugins_3.26.0-0ubuntu6.2_amd64.deb ...
Unpacking totem-plugins (3.26.0-0ubuntu6.2) over (3.26.0-0ubuntu6.1) ...
Preparing to unpack .../07-totem_3.26.0-0ubuntu6.2_amd64.deb ...
Unpacking totem (3.26.0-0ubuntu6.2) over (3.26.0-0ubuntu6.1) ...
Preparing to unpack .../08-totem-common_3.26.0-0ubuntu6.2_all.deb ...
Unpacking totem-common (3.26.0-0ubuntu6.2) over (3.26.0-0ubuntu6.1) ...
Preparing to unpack .../09-gir1.2-totem-1.0_3.26.0-0ubuntu6.2_amd64.deb ...
Unpacking gir1.2-totem-1.0:amd64 (3.26.0-0ubuntu6.2) over (3.26.0-0ubuntu6.1) ...
Preparing to unpack .../10-gnome-shell-extension-ubuntu-dock_0.9.1ubuntu18.04.3_all.deb ...
Unpacking gnome-shell-extension-ubuntu-dock (0.9.1ubuntu18.04.3) over (0.9.1ubuntu18.04.1) ...
Selecting previously unselected package linux-modules-4.15.0-44-generic.
Preparing to unpack .../11-linux-modules-4.15.0-44-generic_4.15.0-44.47_amd64.deb ...
Unpacking linux-modules-4.15.0-44-generic (4.15.0-44.47) ...
Selecting previously unselected package linux-image-4.15.0-44-generic.
Preparing to unpack .../12-linux-image-4.15.0-44-generic_4.15.0-44.47_amd64.deb ...
Unpacking linux-image-4.15.0-44-generic (4.15.0-44.47) ...
Selecting previously unselected package linux-modules-extra-4.15.0-44-generic.
Preparing to unpack .../13-linux-modules-extra-4.15.0-44-generic_4.15.0-44.47_amd64.deb ...
Unpacking linux-modules-extra-4.15.0-44-generic (4.15.0-44.47) ...
Preparing to unpack .../14-linux-generic_4.15.0.44.46_amd64.deb ...
Unpacking linux-generic (4.15.0.44.46) over (4.15.0.43.45) ...
Preparing to unpack .../15-linux-image-generic_4.15.0.44.46_amd64.deb ...
Unpacking linux-image-generic (4.15.0.44.46) over (4.15.0.43.45) ...
Selecting previously unselected package linux-headers-4.15.0-44.
Preparing to unpack .../16-linux-headers-4.15.0-44_4.15.0-44.47_all.deb ...
Unpacking linux-headers-4.15.0-44 (4.15.0-44.47) ...
Selecting previously unselected package linux-headers-4.15.0-44-generic.
Preparing to unpack .../17-linux-headers-4.15.0-44-generic_4.15.0-44.47_amd64.deb ...
Unpacking linux-headers-4.15.0-44-generic (4.15.0-44.47) ...
Preparing to unpack .../18-linux-headers-generic_4.15.0.44.46_amd64.deb ...
Unpacking linux-headers-generic (4.15.0.44.46) over (4.15.0.43.45) ...
Preparing to unpack .../19-linux-libc-dev_4.15.0-44.47_amd64.deb ...
Unpacking linux-libc-dev:amd64 (4.15.0-44.47) over (4.15.0-43.46) ...
Preparing to unpack .../20-linux-signed-generic_4.15.0.44.46_amd64.deb ...
Unpacking linux-signed-generic (4.15.0.44.46) over (4.15.0.43.45) ...
Preparing to unpack .../21-linux-tools-common_4.15.0-44.47_all.deb ...
Unpacking linux-tools-common (4.15.0-44.47) over (4.15.0-43.46) ...
Selecting previously unselected package linux-tools-4.15.0-44.
Preparing to unpack .../22-linux-tools-4.15.0-44_4.15.0-44.47_amd64.deb ...
Unpacking linux-tools-4.15.0-44 (4.15.0-44.47) ...
Selecting previously unselected package linux-tools-4.15.0-44-generic.
Preparing to unpack .../23-linux-tools-4.15.0-44-generic_4.15.0-44.47_amd64.deb ...
Unpacking linux-tools-4.15.0-44-generic (4.15.0-44.47) ...
Preparing to unpack .../24-linux-tools-virtual_4.15.0.44.46_amd64.deb ...
Unpacking linux-tools-virtual (4.15.0.44.46) over (4.15.0.43.45) ...
Processing triggers for gconf2 (3.2.6-4ubuntu1) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Processing triggers for desktop-file-utils (0.23-1ubuntu3.18.04.2) ...
Setting up libtotem0:amd64 (3.26.0-0ubuntu6.2) ...
Processing triggers for libglib2.0-0:amd64 (2.56.3-0ubuntu0.18.04.1) ...
Processing triggers for libglib2.0-0:i386 (2.56.3-0ubuntu0.18.04.1) ...
Setting up libasound2-data (1.1.3-5ubuntu0.2) ...
Setting up gnome-shell-extension-ubuntu-dock (0.9.1ubuntu18.04.3) ...
Setting up totem-common (3.26.0-0ubuntu6.2) ...
Setting up linux-libc-dev:amd64 (4.15.0-44.47) ...
Setting up linux-headers-4.15.0-44 (4.15.0-44.47) ...
Setting up libasound2:amd64 (1.1.3-5ubuntu0.2) ...
Setting up libasound2:i386 (1.1.3-5ubuntu0.2) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Setting up linux-tools-common (4.15.0-44.47) ...
Setting up linux-modules-4.15.0-44-generic (4.15.0-44.47) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for gnome-menus (3.13.3-11ubuntu1.1) ...
Setting up google-chrome-stable (72.0.3626.81-1) ...
Setting up linux-image-4.15.0-44-generic (4.15.0-44.47) ...
I: /vmlinuz.old is now a symlink to boot/vmlinuz-4.15.0-43-generic
I: /initrd.img.old is now a symlink to boot/initrd.img-4.15.0-43-generic
I: /vmlinuz is now a symlink to boot/vmlinuz-4.15.0-44-generic
I: /initrd.img is now a symlink to boot/initrd.img-4.15.0-44-generic
Setting up linux-headers-4.15.0-44-generic (4.15.0-44.47) ...
Progress: [ 79%] [#############################################.............]
答案1
运行apt list --upgradable
以查看可升级包列表。sudo apt upgrade
再次运行以确保被中断的命令运行直至完成。