Ubuntu 19.10 软件更新程序无法正常工作

Ubuntu 19.10 软件更新程序无法正常工作

在此处输入图片描述我系统上的软件更新程序应用程序失败了。它列出了需要更新的软件包,但在我点击安装后,该应用程序运行了几秒钟,然后闪烁消失。

我使用 Ubuntu 19.10,带有“带有 radeon(tm) hd graphics 的 AMD® A10-5700 apu × 4”

当我运行 apt-get upgrade 或 apt-get dist-upgrade 时,它​​们会失败并出现错误

dpkg: unrecoverable fatal error, aborting:
 loading files list file for package 'automake': cannot open /var/lib/dpkg/info/automake.list (Input/output error)
E: Sub-process /usr/bin/dpkg returned an error code (2)

我可以 cd 到 /var/lib/dpkg/info 但是如果我执行 ls,命令会挂起,直到我按 ctrl-c。

以下是我的系统中“sudo apt-get dist-upgrade”的完整输出

sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following NEW packages will be installed:
  linux-headers-5.3.0-42 linux-headers-5.3.0-42-generic
  linux-image-5.3.0-42-generic linux-modules-5.3.0-42-generic
  linux-modules-extra-5.3.0-42-generic
The following packages will be upgraded:
  apport apport-gtk bsdutils cpp-7 cpp-8 fdisk firefox firefox-locale-en
  fonts-opensymbol gcc-7 gcc-7-base gcc-8 gcc-8-base gir1.2-mutter-5
  gnome-shell gnome-shell-common libarchive13 libasan4 libblkid1
  libblkid1:i386 libc-bin libc-dev-bin libc6 libc6:i386 libc6-dbg libc6-dev
  libc6-i386 libcilkrts5 libegl-mesa0 libegl1-mesa libfdisk1 libgbm1
  libgcc-7-dev libgcc-8-dev libgl1-mesa-dri libgl1-mesa-glx libglapi-mesa
  libgles2-mesa libglx-mesa0 libicu63 libmount1 libmount1:i386 libmpx2
  libmutter-5-0 libreoffice-avmedia-backend-gstreamer libreoffice-base-core
  libreoffice-calc libreoffice-common libreoffice-core libreoffice-draw
  libreoffice-gnome libreoffice-gtk3 libreoffice-help-common
  libreoffice-help-en-us libreoffice-impress libreoffice-math
  libreoffice-ogltrans libreoffice-pdfimport libreoffice-style-breeze
  libreoffice-style-colibre libreoffice-style-elementary
  libreoffice-style-galaxy libreoffice-style-tango libreoffice-writer
  libsmartcols1 libsqlite3-0 libubsan0 libuuid1 libwayland-egl1-mesa
  libxatracker2 linux-generic linux-headers-generic linux-image-generic
  linux-libc-dev linux-signed-generic locales mesa-va-drivers
  mesa-vdpau-drivers mesa-vulkan-drivers mount mutter mutter-common
  python3-apport python3-problem-report python3-uno rfkill snapd
  unattended-upgrades uno-libs3 ure util-linux uuid-runtime
  yaru-theme-gnome-shell yaru-theme-gtk yaru-theme-icon yaru-theme-sound
96 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 73.4 MB/356 MB of archives.
After this operation, 358 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://us.archive.ubuntu.com/ubuntu eoan-updates/main amd64 linux-modules-5.3.0-42-generic amd64 5.3.0-42.34 [14.2 MB]
Get:2 http://us.archive.ubuntu.com/ubuntu eoan-updates/main amd64 linux-image-5.3.0-42-generic amd64 5.3.0-42.34 [8,651 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu eoan-updates/main amd64 linux-modules-extra-5.3.0-42-generic amd64 5.3.0-42.34 [38.3 MB]
Get:4 http://us.archive.ubuntu.com/ubuntu eoan-updates/main amd64 linux-generic amd64 5.3.0.42.36 [1,860 B]
Get:5 http://us.archive.ubuntu.com/ubuntu eoan-updates/main amd64 linux-image-generic amd64 5.3.0.42.36 [2,428 B]
Get:6 http://us.archive.ubuntu.com/ubuntu eoan-updates/main amd64 linux-headers-5.3.0-42 all 5.3.0-42.34 [11.0 MB]
Get:7 http://us.archive.ubuntu.com/ubuntu eoan-updates/main amd64 linux-headers-5.3.0-42-generic amd64 5.3.0-42.34 [1,250 kB]
Get:8 http://us.archive.ubuntu.com/ubuntu eoan-updates/main amd64 linux-headers-generic amd64 5.3.0.42.36 [2,384 B]
Fetched 73.4 MB in 2min 4s (590 kB/s)                                          
Extracting templates from packages: 100%
Preconfiguring packages ...
dpkg: unrecoverable fatal error, aborting:
 loading files list file for package 'automake': cannot open /var/lib/dpkg/info/automake.list (Input/output error)
E: Sub-process /usr/bin/dpkg returned an error code (2)

“sudo fdisk -l” 的输出

Disk /dev/sda: 1.84 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: ST2000DM001-9YN1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 63B039BF-CCA4-4B17-A312-3CAA5FAFB5F5

Device       Start        End    Sectors  Size Type
/dev/sda1     2048    1050623    1048576  512M EFI System
/dev/sda2  1050624 3907028991 3905978368  1.8T Linux LVM




Disk /dev/mapper/ubuntu--vg-root: 1.83 TiB, 1987009576960 bytes, 3880878080 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/mapper/ubuntu--vg-swap_1: 11.99 GiB, 12847153152 bytes, 25092096 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/sdb: 28.9 GiB, 31010586624 bytes, 60567552 sectors
Disk model: USB DISK 3.0    
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x6132549e

Device     Boot   Start      End  Sectors  Size Id Type
/dev/sdb1  *          0  4812191  4812192  2.3G  0 Empty
/dev/sdb2       4073124  4081059     7936  3.9M ef EFI (FAT-12/16/32)
/dev/sdb3       4812800 60567551 55754752 26.6G 83 Linux
ubuntu@ubuntu:~$ sudo e2fsck -fccky /dev/sda2
e2fsck 1.45.3 (14-Jul-2019)
/dev/sda2 is in use.
e2fsck: Cannot continue, aborting.

答案1

文件系统检查

让我们首先检查您的文件系统...

  • 以“试用 Ubuntu”模式启动 Ubuntu Live DVD/USB
  • terminalCtrl+ Alt+打开窗口T
  • 类型sudo fsck -f /dev/mapper/ubuntu--vg-root
  • fsck如果有错误则重复命令

坏块

备份完成后...

    注意:不要中止坏块扫描!

    注意:不要对 SSD 造成坏块

    注意:请先备份您的重要文件!

    注意:这将花费很多小时

    注意:您可能面临硬盘故障

启动至 Ubuntu Live DVD/USB。

terminal...

sudo e2fsck -fcky /dev/mapper/ubuntu--vg-root# 只读测试

或者

sudo e2fsck -fccky /dev/mapper/ubuntu--vg-root#(受到推崇的)

-k 很重要,因为它会保存之前的坏块表,并将任何新的坏块添加到该表中。如果没有 -k,您将丢失所有之前的坏块信息。

-fccky 参数...

   -f    Force checking even if the file system seems clean.

   -c    This option causes e2fsck to use badblocks(8) program  to  do  a
         read-only  scan  of  the device in order to find any bad blocks.
         If any bad blocks are found, they are added  to  the  bad  block
         inode  to  prevent them from being allocated to a file or direc‐
         tory.  If this option is specified twice,  then  the  bad  block
         scan will be done using a non-destructive read-write test.

   -k    When combined with the -c option, any existing bad blocks in the
         bad blocks list are preserved, and any new bad blocks  found  by
         running  badblocks(8)  will  be added to the existing bad blocks
         list.

   -y    Assume  an answer of `yes' to all questions; allows e2fsck to be
         used non-interactively.  This option may not be specified at the
         same time as the -n or -p options.

相关内容