1 votes

apt-get autoremove échoue

J'ai quelques installations Ubuntu cassées sur mon serveur. Je n'arrive pas à m'en débarrasser. purge y autoremove ne fonctionne pas. Il m'empêche également d'installer de nouveaux paquets avec apt-get install . Il échoue à l'installation parce qu'il échoue d'abord à la suppression.

root@pxeserver:/boot# apt-get autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  linux-image-extra-3.16.0-34-generic linux-image-extra-3.16.0-37-generic
  linux-image-extra-3.16.0-38-generic linux-image-extra-3.16.0-41-generic
0 upgraded, 0 newly installed, 4 to remove and 0 not upgraded.
6 not fully installed or removed.
After this operation, 467 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 114203 files and directories currently installed.)
Removing linux-image-extra-3.16.0-34-generic (3.16.0-34.47~14.04.1) ...
depmod: FATAL: could not load /boot/System.map-3.16.0-34-generic: No such file or directory
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.16.0-34-generic /boot/vmlinuz-3.16.0-34-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.16.0-34-generic /boot/vmlinuz-3.16.0-34-generic
update-initramfs: Generating /boot/initrd.img-3.16.0-34-generic
grep: /boot/config-3.16.0-34-generic: No such file or directory
WARNING: missing /lib/modules/3.16.0-34-generic
Device driver support needs thus be built-in linux image!
depmod: ERROR: could not open directory /lib/modules/3.16.0-34-generic: No such file or directory
depmod: FATAL: could not search modules: No such file or directory
depmod: WARNING: could not open /tmp/mkinitramfs_BSLxsR/lib/modules/3.16.0-34-generic/modules.order: No such file or directory
depmod: WARNING: could not open /tmp/mkinitramfs_BSLxsR/lib/modules/3.16.0-34-generic/modules.builtin: No such file or directory
run-parts: executing /etc/kernel/postinst.d/update-notifier 3.16.0-34-generic /boot/vmlinuz-3.16.0-34-generic
run-parts: executing /etc/kernel/postinst.d/zz-extlinux 3.16.0-34-generic /boot/vmlinuz-3.16.0-34-generic
P: Checking for EXTLINUX directory... found.
P: Writing config for /boot/vmlinuz-3.16.0-41-generic...
P: Writing config for /boot/vmlinuz-3.16.0-33-generic...
P: Installing debian theme... done.
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 3.16.0-34-generic /boot/vmlinuz-3.16.0-34-generic
/etc/kernel/postinst.d/zz-update-grub: 22: /etc/kernel/postinst.d/zz-update-grub: Syntax error: "fi" unexpected
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 2
dpkg: error processing package linux-image-extra-3.16.0-34-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
Removing linux-image-extra-3.16.0-37-generic (3.16.0-37.51~14.04.1) ...
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.16.0-37-generic /boot/vmlinuz-3.16.0-37-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.16.0-37-generic /boot/vmlinuz-3.16.0-37-generic
update-initramfs: Generating /boot/initrd.img-3.16.0-37-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 3.16.0-37-generic /boot/vmlinuz-3.16.0-37-generic
run-parts: executing /etc/kernel/postinst.d/zz-extlinux 3.16.0-37-generic /boot/vmlinuz-3.16.0-37-generic
P: Checking for EXTLINUX directory... found.
P: Writing config for /boot/vmlinuz-3.16.0-41-generic...
P: Writing config for /boot/vmlinuz-3.16.0-33-generic...
P: Installing debian theme... done.
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 3.16.0-37-generic /boot/vmlinuz-3.16.0-37-generic
/etc/kernel/postinst.d/zz-update-grub: 22: /etc/kernel/postinst.d/zz-update-grub: Syntax error: "fi" unexpected
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 2
dpkg: error processing package linux-image-extra-3.16.0-37-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
Removing linux-image-extra-3.16.0-38-generic (3.16.0-38.52~14.04.1) ...
depmod: FATAL: could not load /boot/System.map-3.16.0-38-generic: No such file or directory
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.16.0-38-generic /boot/vmlinuz-3.16.0-38-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.16.0-38-generic /boot/vmlinuz-3.16.0-38-generic
update-initramfs: Generating /boot/initrd.img-3.16.0-38-generic
grep: /boot/config-3.16.0-38-generic: No such file or directory
WARNING: missing /lib/modules/3.16.0-38-generic
Device driver support needs thus be built-in linux image!
depmod: ERROR: could not open directory /lib/modules/3.16.0-38-generic: No such file or directory
depmod: FATAL: could not search modules: No such file or directory
depmod: WARNING: could not open /tmp/mkinitramfs_VP711p/lib/modules/3.16.0-38-generic/modules.order: No such file or directory
depmod: WARNING: could not open /tmp/mkinitramfs_VP711p/lib/modules/3.16.0-38-generic/modules.builtin: No such file or directory
run-parts: executing /etc/kernel/postinst.d/update-notifier 3.16.0-38-generic /boot/vmlinuz-3.16.0-38-generic
run-parts: executing /etc/kernel/postinst.d/zz-extlinux 3.16.0-38-generic /boot/vmlinuz-3.16.0-38-generic
P: Checking for EXTLINUX directory... found.
P: Writing config for /boot/vmlinuz-3.16.0-41-generic...
P: Writing config for /boot/vmlinuz-3.16.0-33-generic...
P: Installing debian theme... done.
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 3.16.0-38-generic /boot/vmlinuz-3.16.0-38-generic
/etc/kernel/postinst.d/zz-update-grub: 22: /etc/kernel/postinst.d/zz-update-grub: Syntax error: "fi" unexpected
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 2
dpkg: error processing package linux-image-extra-3.16.0-38-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
Removing linux-image-extra-3.16.0-41-generic (3.16.0-41.57~14.04.1) ...
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.16.0-41-generic /boot/vmlinuz-3.16.0-41-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.16.0-41-generic /boot/vmlinuz-3.16.0-41-generic
update-initramfs: Generating /boot/initrd.img-3.16.0-41-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 3.16.0-41-generic /boot/vmlinuz-3.16.0-41-generic
run-parts: executing /etc/kernel/postinst.d/zz-extlinux 3.16.0-41-generic /boot/vmlinuz-3.16.0-41-generic
P: Checking for EXTLINUX directory... found.
P: Writing config for /boot/vmlinuz-3.16.0-41-generic...
P: Writing config for /boot/vmlinuz-3.16.0-33-generic...
P: Installing debian theme... done.
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 3.16.0-41-generic /boot/vmlinuz-3.16.0-41-generic
/etc/kernel/postinst.d/zz-update-grub: 22: /etc/kernel/postinst.d/zz-update-grub: Syntax error: "fi" unexpected
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 2
dpkg: error processing package linux-image-extra-3.16.0-41-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
No apport report written because MaxReports is reached already
                                                              Errors were encountered while processing:
 linux-image-extra-3.16.0-34-generic
 linux-image-extra-3.16.0-37-generic
 linux-image-extra-3.16.0-38-generic
 linux-image-extra-3.16.0-41-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

0voto

thedler Points 314

Essayez ceci pour chaque paquet linux-image-extra-* :

dpkg --purge --force-depends linux-image-extra-3.16.0-34-generic

Si cela ne fonctionne pas, vous pouvez essayer d'éliminer les journaux ERROR et FATAL en générant les fichiers manquants à l'aide de la commande

touch /boot/System.map-3.16.0-34-generic

0voto

Mnementh Points 19831

Est-il possible de réinstaller les paquets en sudo apt-get install --reinstall ? Il installera les paquets linux-image respectifs comme dépendance, que vous pourrez purger ensuite avec le paquet linux-image-extra par sudo apt-get purge .

SistemesEz.com

SystemesEZ est une communauté de sysadmins où vous pouvez résoudre vos problèmes et vos doutes. Vous pouvez consulter les questions des autres sysadmins, poser vos propres questions ou résoudre celles des autres.

Powered by:

X