Chaque fois que j'installe un nouveau noyau (ou que le noyau est mis à niveau), il y a beaucoup d'erreurs.
L'erreur que je reçois après avoir fait
Sudo apt -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
5 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up linux-headers-4.18.0-17-generic (4.18.0-17.18) ...
/etc/kernel/header_postinst.d/dkms:
Error! Could not locate dkms.conf file.
File: does not exist.
run-parts: /etc/kernel/header_postinst.d/dkms exited with return code 4
dpkg: error processing package linux-headers-4.18.0-17-generic (--configure):
installed linux-headers-4.18.0-17-generic package post-installation script subprocess returned error exit status 1
Setting up linux-image-4.18.0-17-generic (4.18.0-17.18) ...
dpkg: dependency problems prevent configuration of linux-headers-generic:
linux-headers-generic depends on linux-headers-4.18.0-17-generic; however:
Package linux-headers-4.18.0-17-generic is not configured yet.
dpkg: error processing package linux-headers-generic (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-generic:
linux-generic depends on linux-headers-generic (= 4.18.0.17.18); however:
Package linux-headers-generic is not configured yet.
dpkg: error processing package linux-generic (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-signed-generic:
linux-signed-generic depends on linux-generic; however:
Package linux-generic is not configured yet.
dpkg: error processing package linux-signed-generic (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
No apport report written because the error message indicates its a followup error from a previous failure.
No apport report written because MaxReports is reached already
Processing triggers for linux-image-4.18.0-17-generic (4.18.0-17.18) ...
/etc/kernel/postinst.d/dkms:
Error! Could not locate dkms.conf file.
File: does not exist.
run-parts: /etc/kernel/postinst.d/dkms exited with return code 4
dpkg: error processing package linux-image-4.18.0-17-generic (--configure):
installed linux-image-4.18.0-17-generic package post-installation script subprocess returned error exit status 1
No apport report written because MaxReports is reached already
Errors were encountered while processing:
linux-headers-4.18.0-17-generic
linux-headers-generic
linux-generic
linux-signed-generic
linux-image-4.18.0-17-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
J'ai tout essayé comme indiqué dans d'autres questions
apt-get -f install
apt-get autoremove
apt-get remove linux-image-4.18.0-17-generic
J'ai également utilisé dpkg et ukuu pour supprimer le package linux-image-4.18.0-17-generic mais rien n'a fonctionné
Voici la sortie de diverses commandes que j'ai essayées
Sudo dpkg --configure -a
Setting up linux-image-4.18.0-17-generic (4.18.0-17.18) ...
dpkg: dependency problems prevent configuration of linux-headers-generic:
linux-headers-generic depends on linux-headers-4.18.0-17-generic; however:
Package linux-headers-4.18.0-17-generic is not configured yet.
dpkg: error processing package linux-headers-generic (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-generic:
linux-generic depends on linux-headers-generic (= 4.18.0.17.18); however:
Package linux-headers-generic is not configured yet.
dpkg: error processing package linux-generic (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-signed-generic:
linux-signed-generic depends on linux-generic; however:
Package linux-generic is not configured yet.
dpkg: error processing package linux-signed-generic (--configure):
dependency problems - leaving unconfigured
Processing triggers for linux-image-4.18.0-17-generic (4.18.0-17.18) ...
/etc/kernel/postinst.d/dkms:
Error! Could not locate dkms.conf file.
File: does not exist.
run-parts: /etc/kernel/postinst.d/dkms exited with return code 4
dpkg: error processing package linux-image-4.18.0-17-generic (--configure):
installed linux-image-4.18.0-17-generic package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
linux-headers-generic
linux-generic
linux-signed-generic
linux-image-4.18.0-17-generic
Sudo dpkg --purge linux-headers-4.18.0-17-generic
dpkg: dependency problems prevent removal of linux-headers-4.18.0-17-generic:
linux-headers-generic depends on linux-headers-4.18.0-17-generic.
dpkg: error processing package linux-headers-4.18.0-17-generic (--purge):
dependency problems - not removing
Errors were encountered while processing:
linux-headers-4.18.0-17-generic
Je ne peux pas supprimer 4.18.0-17 et j'ai essayé presque tout sur Internet et toutes les réponses sur askubuntu disent la même chose qui ne fonctionne pas pour moi. J'ai également un tas de modules dkms installés sur mon système, mais je suis presque sûr que cela s'est produit en raison de wine car c'est la seule chose supplémentaire que j'ai installée en dehors de chrome et modules dkms et j'ai utilisé ubuntu normalement avant que cette erreur ne se produise.
En regardant ceci: Impossible de supprimer les noyaux "run-parts: /etc/kernel/postrm.d/zz-update-grub sorti avec le code retour 1" , j'ai trouvé une solution.
Essayez de renommer le script grub pour qu'il soit contourné. Ce n'est pas une solution à long terme, mais vous pourrez peut-être exécuter vos mises à jour.
Sudo mv /etc/kernel/postrm.d/zz-update-grub /etc/kernel/postrm.d/zz-update-grub.bad
Ensuite, mettez à jour
Sudo apt update && Sudo apt full-upgrade
Vous pouvez avoir une liste de vos noyaux installés avec la commande suivante:
dpkg -l | tail -n +6 | grep -E 'linux-image-[0-9]+' | grep -Fv $(uname -r)
Dans la sortie de la commande susmentionnée, notez que "ii" signifie installé, "rc" signifie supprimé et "rH" signifie à moitié supprimé, corrompu ou similaire.
Vous devriez toujours regarder quel noyau est actuellement utilisé (uname -r
) et ne jamais retirer celui-ci !!
Ensuite, vous pouvez supprimer votre noyau problématique (ici linux-image-4.18.0-17-generic):
Sudo apt remove --purge linux-image-4.18.0-17-generic
Et enfin remettre le script grub en place.
Sudo mv /etc/kernel/postrm.d/zz-update-grub.bad /etc/kernel/postrm.d/zz-update-grub