18.04 "sudo apt autoremove" causa erro "AVISO: faltando /lib/modules/uname"

18.04 "sudo apt autoremove" causa erro "AVISO: faltando /lib/modules/uname"

Após atualizar o kernel para 5.0.0-36-generic, ocorreu um erro durante a instalação das atualizações após a atualização do kernel. Especificamente, parece ter se manifestado durante a atualização do linux-firmwarepacote.

Executar o atualizador de software ou sudo apt updateem um terminal indica que todos os pacotes estão atualizados.

No entanto, o Synaptic Package Manager diz que linux-firmwarea instalação ainda não foi concluída. Se eu tentar reinstalá-lo, recebo um erro semelhante ao mostrado abaixo.

Eu tentei sudo apt cleane sudo apt autoremove. Quando instalo pacotes usando o Synaptic, a instalação relata erros, mas o pacote é instalado.

O computador inicializa bem.

A instalação 18.04 reside na segunda das três partições primárias /dev/sda2, o Ubuntu 16.04 está ativado /dev/sda1e /dev/sda3está vazio.

O erro é este:

martin@computer:~$ sudo apt autoremove
[sudo] password for martin: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up linux-firmware (1.173.12) ...
update-initramfs: Generating /boot/initrd.img-uname
WARNING: missing /lib/modules/uname
Ensure all necessary drivers are built into the linux image!
depmod: ERROR: Bad version passed uname
dpkg: warning: version 'uname' has bad syntax: version number does not start with a digit
dpkg: warning: version 'uname' has bad syntax: version number does not start with a digit
dpkg: warning: version 'uname' has bad syntax: version number does not start with a digit
dpkg: warning: version 'uname' has bad syntax: version number does not start with a digit
depmod: ERROR: Bad version passed uname
update-initramfs: Generating /boot/initrd.img-uname-r
WARNING: missing /lib/modules/uname-r
Ensure all necessary drivers are built into the linux image!
depmod: ERROR: Bad version passed uname-r
dpkg: warning: version 'uname-r' has bad syntax: version number does not start with a digit
dpkg: warning: version 'uname-r' has bad syntax: version number does not start with a digit
dpkg: warning: version 'uname-r' has bad syntax: version number does not start with a digit
dpkg: warning: version 'uname-r' has bad syntax: version number does not start with a digit
depmod: ERROR: Bad version passed uname-r
update-initramfs: Generating /boot/initrd.img-uname
WARNING: missing /lib/modules/uname
Ensure all necessary drivers are built into the linux image!
depmod: ERROR: Bad version passed uname
dpkg: warning: version 'uname' has bad syntax: version number does not start with a digit
dpkg: warning: version 'uname' has bad syntax: version number does not start with a digit
dpkg: warning: version 'uname' has bad syntax: version number does not start with a digit
dpkg: warning: version 'uname' has bad syntax: version number does not start with a digit
depmod: ERROR: Bad version passed uname
update-initramfs: Generating /boot/initrd.img--r
/usr/sbin/mkinitramfs: option requires an argument -- 'r'
W: non-GNU getopt
update-initramfs: failed for /boot/initrd.img--r with 1.
dpkg: error processing package linux-firmware (--configure):
 installed linux-firmware package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 linux-firmware
E: Sub-process /usr/bin/dpkg returned an error code (1)
martin@computer:~$

Existem atualmente três kernels na instalação 18.04:

martin@computer:~$ ls -al /boot/
total 179196
drwxr-xr-x  3 root root     4096 Nov 15 22:48 .
drwxr-xr-x 24 root root     4096 Nov 14 20:48 ..
-rw-r--r--  1 root root   217480 Nov 12 09:54 config-4.15.0-70-generic
-rw-r--r--  1 root root   224516 Nov 11 08:44 config-5.0.0-35-generic
-rw-r--r--  1 root root   224516 Nov 12 10:46 config-5.0.0-36-generic
drwxr-xr-x  6 root root     4096 Nov 13 20:50 grub
-rw-r--r--  1 root root 39680508 Nov 13 19:29 initrd.img-4.15.0-70-generic
-rw-r--r--  1 root root 41118914 Nov 13 17:33 initrd.img-5.0.0-35-generic
-rw-r--r--  1 root root 41116325 Nov 15 16:23 initrd.img-5.0.0-36-generic
-rw-r--r--  1 root root 10854263 Nov 15 22:48 initrd.img-uname
-rw-r--r--  1 root root 10854268 Nov 15 22:48 initrd.img-uname-r
-rw-r--r--  1 root root   182704 Jan 28  2016 memtest86+.bin
-rw-r--r--  1 root root   184380 Jan 28  2016 memtest86+.elf
-rw-r--r--  1 root root   184840 Jan 28  2016 memtest86+_multiboot.bin
-rw-------  1 root root  4066166 Nov 12 09:54 System.map-4.15.0-70-generic
-rw-------  1 root root  4301791 Nov 11 08:44 System.map-5.0.0-35-generic
-rw-------  1 root root  4301791 Nov 12 10:46 System.map-5.0.0-36-generic
-rw-------  1 root root  8363672 Nov 12 09:58 vmlinuz-4.15.0-70-generic
-rw-------  1 root root  8785656 Nov 11 08:48 vmlinuz-5.0.0-35-generic
-rw-------  1 root root  8785656 Nov 12 10:47 vmlinuz-5.0.0-36-generic
martin@computer:~$

informação relacionada