2 votos

No se puede ejecutar la actualización apt-get, el error Siempre no se puede eliminar linux-image-4.15.0-53-generic

¿Alguien puede ayudarme, gracias.

 root@awan:~# apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages will be REMOVED:
  linux-image-4.15.0-53-generic
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 8327 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 61586 files and directories currently installed.)
Removing linux-image-4.15.0-53-generic (4.15.0-53.57) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-4.15.0-53-generic
/etc/kernel/postrm.d/x-grub-legacy-ec2:
Searching for GRUB installation directory ... found: /boot/grub
/usr/sbin/update-grub-legacy-ec2: line 85: awk: command not found
Cannot determine root device.  Assuming /dev/hda1
This error is probably caused by an invalid /etc/fstab
/usr/sbin/update-grub-legacy-ec2: line 85: awk: command not found
/usr/sbin/update-grub-legacy-ec2: line 375: awk: command not found
run-parts: /etc/kernel/postrm.d/x-grub-legacy-ec2 exited with return code 127
dpkg: error processing package linux-image-4.15.0-53-generic (--remove):
 installed linux-image-4.15.0-53-generic package post-removal script subprocess returned error exit status 1
Errors were encountered while processing:
 linux-image-4.15.0-53-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
 

Editar

Intento este dpkg -l | egrep -v '^ ii | rc'

 dpkg -l | egrep -v '^ii|rc'
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
+++-=====================================-========================================================-============-===============================================================================
iF  initramfs-tools                       0.130ubuntu3.8                                           all          generic modular initramfs generator (automation)
rH  linux-image-4.15.0-53-generic         4.15.0-53.57                                             amd64        Signed kernel image generic
ic  unattended-upgrades                   1.1ubuntu1.18.04.11                                      all          automatic installation of security upgrades
 

1voto

user966203 Puntos 153

Primer intento sudo dpkg --configure initramfs-tools El paquete no está completamente configurado. ¿Sin suerte?

 sudo apt install --reinstall initramfs-tools
 

Si el error persiste wget -c http://mirrors.kernel.org/ubuntu/pool/main/i/initramfs-tools/initramfs-tools_0.130ubuntu3.8_all.deb , instale el paquete con dpkg -i initramfs-tools_0.130ubuntu3.8_all.deb . Este paquete es importante ya que crea o actualiza initrd (disco RAM inicializado del cargador de arranque)

 sudo dpkg -P linux-image-4.15.0-53-generic 

sudo apt -f install
 

EnMiMaquinaFunciona.com

EnMiMaquinaFunciona es una comunidad de administradores de sistemas en la que puedes resolver tus problemas y dudas.
Puedes consultar las preguntas de otros sysadmin, hacer tus propias preguntas o resolver las de los demás.

Powered by: