dpkg:ubuntu 18.04 升级至 20.04.1 后处理软件包 linux-firmware(--configure)时出错

dpkg:ubuntu 18.04 升级至 20.04.1 后处理软件包 linux-firmware(--configure)时出错

我从 18.04 升级到 Ubuntu 20.04.1 但出现固件错误,我该如何修复?

我试过: sudo dpkg --configure -a

rt@sys76:~$ sudo dpkg --configure -a

dpkg: error processing package linux-firmware (--configure):
 package is in a very bad inconsistent state; you should
 reinstall it before attempting configuration
dpkg: dependency problems prevent configuration of linux-image-generic:
 linux-image-generic depends on linux-firmware; however:
  Package linux-firmware is not configured yet.

dpkg: error processing package linux-image-generic (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 linux-firmware
 linux-image-generic

我也尝试过 sudo apt-get install -f

rt@sys76:~$ sudo apt-get install -f


dpkg: error processing package linux-firmware (--configure):
 package is in a very bad inconsistent state; you should
 reinstall it before attempting configuration
dpkg: dependency problems prevent configuration of linux-image-generic:
 linux-image-generic depends on linux-firmware; however:
  Package linux-firmware is not configured yet.

dpkg: error processing package linux-image-generic (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                          Errors were encountered while processing:
 linux-firmware
 linux-image-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

我也尝试过 sudo apt-get install -y linux-firmware

rt@sys76:~$ sudo apt-get install -y linux-firmware

    2 not fully installed or removed.
    Need to get 0 B/98.9 MB of archives.
    After this operation, 0 B of additional disk space will be used.
    dpkg: error processing package linux-firmware (--configure):
     package is in a very bad inconsistent state; you should
     reinstall it before attempting configuration
    No apport report written because the error message indicates its a followup error from a previous failure.
                              dpkg: dependency problems prevent configuration of linux-image-generic:
     linux-image-generic depends on linux-firmware; however:
      Package linux-firmware is not configured yet.
    
    dpkg: error processing package linux-image-generic (--configure):
     dependency problems - leaving unconfigured
    Errors were encountered while processing:
     linux-firmware
     linux-image-generic
    E: Sub-process /usr/bin/dpkg returned an error code (1)

还尝试过:sudo apt --fix-broken install

rt@sys76:~$ sudo apt --fix-broken install

Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
2 not fully installed or removed.
Need to get 0 B/98.9 MB of archives.
After this operation, 0 B of additional disk space will be used.
dpkg: error processing package linux-firmware (--configure):
 package is in a very bad inconsistent state; you should
 reinstall it before attempting configuration
No apport report written because the error message indicates its a followup erro
r from a previous failure.
                          dpkg: dependency problems prevent configuration of lin
ux-image-generic:
 linux-image-generic depends on linux-firmware; however:
  Package linux-firmware is not configured yet.

dpkg: error processing package linux-image-generic (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 linux-firmware
 linux-image-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

还尝试过:sudo apt-get dist-upgrade

rt@sys76:~$ sudo apt-get dist-upgrade

Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
Need to get 0 B/98.9 MB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
dpkg: error processing package linux-firmware (--configure):
 package is in a very bad inconsistent state; you should
 reinstall it before attempting configuration
No apport report written because the error message indicates its a followup error from a previous failure.
                          dpkg: dependency problems prevent configuration of linux-image-generic:
 linux-image-generic depends on linux-firmware; however:
  Package linux-firmware is not configured yet.

dpkg: error processing package linux-image-generic (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 linux-firmware
 linux-image-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

一些信息:

rt@sys76:~$ uname -a
Linux sys76 5.4.0-48-generic #52-Ubuntu SMP Thu Sep 10 10:58:49 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
rt@sys76:~$




rt@sys76:~$ ls -lh /lib/modules
total 236K
drwxr-xr-x 2 root root 4.0K Jan 23  2018 4.10.0-42-generic
drwxr-xr-x 2 root root 4.0K Jun 29 10:36 4.15.0-101-generic
drwxr-xr-x 2 root root 4.0K Jul  2 00:22 4.15.0-106-generic
drwxr-xr-x 2 root root 4.0K Jul 13 23:18 4.15.0-108-generic
drwxr-xr-x 2 root root 4.0K Jul 23 03:40 4.15.0-109-generic
drwxr-xr-x 2 root root 4.0K Sep  2 12:10 4.15.0-111-generic
drwxr-xr-x 2 root root 4.0K Sep  8 09:50 4.15.0-112-generic
drwxr-xr-x 2 root root 4.0K Sep 21 16:47 4.15.0-115-generic
drwxr-xr-x 2 root root 4.0K Sep 30 09:32 4.15.0-117-generic
drwxr-xr-x 5 root root 4.0K Sep 21 10:27 4.15.0-118-generic
drwxr-xr-x 2 root root 4.0K Jun 11  2018 4.15.0-20-generic
drwxr-xr-x 2 root root 4.0K Jul  2  2018 4.15.0-22-generic
drwxr-xr-x 2 root root 4.0K Jul 21  2018 4.15.0-23-generic
drwxr-xr-x 2 root root 4.0K Aug  7  2018 4.15.0-24-generic
drwxr-xr-x 3 root root 4.0K Sep  5  2018 4.15.0-29-generic
drwxr-xr-x 2 root root 4.0K Aug 24  2018 4.15.0-30-generic
drwxr-xr-x 2 root root 4.0K Sep 10  2018 4.15.0-32-generic
drwxr-xr-x 3 root root 4.0K Oct  2  2018 4.15.0-33-generic
drwxr-xr-x 3 root root 4.0K Oct 23  2018 4.15.0-34-generic
drwxr-xr-x 3 root root 4.0K Nov 14  2018 4.15.0-36-generic
drwxr-xr-x 3 root root 4.0K Dec 21  2018 4.15.0-38-generic
drwxr-xr-x 2 root root 4.0K Dec 20  2018 4.15.0-39-generic
drwxr-xr-x 2 root root 4.0K Jan 29  2019 4.15.0-42-generic
drwxr-xr-x 3 root root 4.0K Jan 31  2019 4.15.0-43-generic
drwxr-xr-x 3 root root 4.0K Mar  6  2019 4.15.0-44-generic
drwxr-xr-x 3 root root 4.0K Apr  4  2019 4.15.0-45-generic
drwxr-xr-x 2 root root 4.0K Apr 25  2019 4.15.0-46-generic
drwxr-xr-x 3 root root 4.0K May 15  2019 4.15.0-47-generic
drwxr-xr-x 3 root root 4.0K Jun  4  2019 4.15.0-48-generic
drwxr-xr-x 3 root root 4.0K May 20 11:30 4.15.0-50-generic
drwxr-xr-x 2 root root 4.0K Jun 28  2019 4.15.0-51-generic
drwxr-xr-x 2 root root 4.0K Jul 25  2019 4.15.0-52-generic
drwxr-xr-x 2 root root 4.0K Aug 14  2019 4.15.0-54-generic
drwxr-xr-x 2 root root 4.0K Sep  3  2019 4.15.0-55-generic
drwxr-xr-x 2 root root 4.0K Sep 10  2019 4.15.0-58-generic
drwxr-xr-x 2 root root 4.0K Sep 18  2019 4.15.0-60-generic
drwxr-xr-x 2 root root 4.0K Oct  1  2019 4.15.0-62-generic
drwxr-xr-x 2 root root 4.0K Oct 22  2019 4.15.0-64-generic
drwxr-xr-x 2 root root 4.0K Nov 13  2019 4.15.0-65-generic
drwxr-xr-x 2 root root 4.0K Nov 15  2019 4.15.0-66-generic
drwxr-xr-x 2 root root 4.0K Dec  2  2019 4.15.0-69-generic
drwxr-xr-x 2 root root 4.0K Jan  7  2020 4.15.0-70-generic
drwxr-xr-x 2 root root 4.0K Jan 28  2020 4.15.0-72-generic
drwxr-xr-x 2 root root 4.0K Feb 17  2020 4.15.0-74-generic
drwxr-xr-x 2 root root 4.0K Mar 17  2020 4.15.0-76-generic
drwxr-xr-x 2 root root 4.0K Apr  7 07:49 4.15.0-88-generic
drwxr-xr-x 5 root root 4.0K Mar 16  2020 4.15.0-91-generic
drwxr-xr-x 2 root root 4.0K May 20 04:37 4.15.0-96-generic
drwxr-xr-x 2 root root 4.0K Jun 10 14:52 4.15.0-99-generic
drwxr-xr-x 3 root root 4.0K Mar  7  2018 4.4.111-0404111-generic
drwxr-xr-x 3 root root 4.0K Mar 13  2018 4.4.119-0404119-generic
drwxr-xr-x 3 root root 4.0K Mar 20  2018 4.4.120-0404120-generic
drwxr-xr-x 3 root root 4.0K Mar 27  2018 4.4.121-0404121-generic
drwxr-xr-x 3 root root 4.0K Apr  2  2018 4.4.122-0404122-generic
drwxr-xr-x 6 root root 4.0K Apr 27  2018 4.4.126-0404126-generic
drwxr-xr-x 6 root root 4.0K Apr 27  2018 4.4.127-0404127-generic
drwxr-xr-x 3 root root 4.0K Apr 18  2018 4.4.128-0404128-generic
drwxr-xr-x 3 root root 4.0K Apr 26  2018 4.8.17-040817-generic
drwxr-xr-x 5 root root 4.0K Sep 30 07:44 5.4.0-48-generic


rt@sys76:~$ sudo dpkg -C  
The following packages are in a mess due to serious problems during
installation.  They must be reinstalled for them (and any packages
that depend on them) to function properly:
 linux-firmware       Firmware for Linux kernel drivers

The following packages have been unpacked but not yet configured.
They must be configured using dpkg --configure or the configure
menu option in dselect for them to work:
 linux-image-generic  Generic Linux kernel image

答案1

找到简单的解决办法

sudo apt install --reinstall linux-firmware

相关内容