Erro ao executar uma atualização no Debian 9

4

Embora eu esteja logado como root, abaixo está o conflito que estou tendo ao tentar realizar uma atualização:

root@:/home/frederic# apt-get upgrade
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.
3 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up linux-headers-4.9.0-3-amd64 (4.9.30-2+deb9u3) ...
/etc/kernel/header_postinst.d/dkms:
Error! You must be root to use this command.
run-parts: /etc/kernel/header_postinst.d/dkms exited with return code 1
Failed to process /etc/kernel/header_postinst.d at /var/lib/dpkg/info/linux-headers-4.9.0-3-amd64.postinst line 11.
dpkg: error processing package linux-headers-4.9.0-3-amd64 (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up linux-image-4.9.0-3-amd64 (4.9.30-2+deb9u3) ...
/etc/kernel/postinst.d/dkms:
Error! You must be root to use this command.
run-parts: /etc/kernel/postinst.d/dkms exited with return code 1
dpkg: error processing package linux-image-4.9.0-3-amd64 (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of linux-image-amd64:
 linux-image-amd64 depends on linux-image-4.9.0-3-amd64; however:
  Package linux-image-4.9.0-3-amd64 is not configured yet.

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

Para mim, parece que há um problema com o pacote dkms , mas quando tento reinstalá-lo, não é melhor:

root@:/home/frederic# apt-get install --reinstall dkms
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
3 not fully installed or removed.
Need to get 0 B/74.8 kB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 142800 files and directories currently installed.)
Preparing to unpack .../archives/dkms_2.3-2_all.deb ...
Unpacking dkms (2.3-2) over (2.3-2) ...
Setting up linux-headers-4.9.0-3-amd64 (4.9.30-2+deb9u3) ...
/etc/kernel/header_postinst.d/dkms:
Error! You must be root to use this command.
run-parts: /etc/kernel/header_postinst.d/dkms exited with return code 1
Failed to process /etc/kernel/header_postinst.d at /var/lib/dpkg/info/linux-headers-4.9.0-3-amd64.postinst line 11.
dpkg: error processing package linux-headers-4.9.0-3-amd64 (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up dkms (2.3-2) ...
Processing triggers for man-db (2.7.6.1-2) ...
Setting up linux-image-4.9.0-3-amd64 (4.9.30-2+deb9u3) ...
/etc/kernel/postinst.d/dkms:
Error! You must be root to use this command.
run-parts: /etc/kernel/postinst.d/dkms exited with return code 1
dpkg: error processing package linux-image-4.9.0-3-amd64 (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of linux-image-amd64:
 linux-image-amd64 depends on linux-image-4.9.0-3-amd64; however:
  Package linux-image-4.9.0-3-amd64 is not configured yet.

dpkg: error processing package linux-image-amd64 (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 linux-headers-4.9.0-3-amd64
 linux-image-4.9.0-3-amd64
 linux-image-amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)
    
por Frederic 01.09.2017 / 19:53

1 resposta

5

Quanto a você ter erros com dkms , aconselho como primeiro curso de ação, verificar se realmente dkms é necessário, antes de perder tempo investigando a raiz principal do erro.

Normalmente, dkms é usado para (re) compilar / instalar módulos adicionais automagicamente, não pertencendo ao kernel padrão após a instalação de um pacote com uma nova versão do kernel. Por exemplo, sysdig modules ou drivers realtek, ou em versões antigas do Debian, módulos VMware vmtools.

Como vimos no pedido, ls -la /var/lib/dkms não possui módulos adicionais para compilar lá (normalmente (sub) diretórios com código-fonte).

Portanto, sabemos que o dkms não está fazendo nada útil nesta máquina.

ls -la /var/lib/dkms
total 12 
drwxr-xr-x 2  root root 4096 Sep  1 11:53 . 
drwxr-xr-x 46 root root 4096 Aug 30 16:18 .. 
-rw-r--r-- 1  root root    6 Aug 31 2016 dkms_dbversion

Assim, o curso de ação recomendado é desinstalá-lo, com o comando:

sudo aptitude purge dkms
    
por 01.09.2017 / 21:42

Tags