
Intenté instalar un paquete ( jsonlint
) apt-get
en un sistema Xubuntu 15.10 y falló debido a un error al instalar linux-image-4.2.0-25-generic
. Esta fue una instalación nueva y limpia de 15.10, 15 de enero de 2016.
Lo intenté solo
sudo apt-get install linux-image-4.2.0-25-generic
y falla. Tampoco puedo eliminar linux-image-4.2.0-25-generic
.
linux-image-4.2.0-23-generic
está activo /boot
y arranca correctamente a través de grub
, pero estos artefactos -25 rotos impiden las actualizaciones.
No puedo eliminar ni instalar el kernelno ayudó
A continuación se muestran mis registros de intentar instalar/eliminar. No uso lilo, así que no estoy seguro de qué significan esos errores o cómo ignorarlos.
¿Cómo puedo limpiar esto para poder instalar otros paquetes? apt-get --force-yes
Suena peligroso; ¿Hay una mejor manera?
Intenté eliminarlo después de que falló la instalación anterior:
$ uname -r
4.2.0-23-generic
$ sudo apt-get update
...
$ sudo apt-get remove linux-image-4.2.0-25-generic
(Reading database ... 208105 files and directories currently installed.)
Removing linux-generic (4.2.0.25.27) ...
Removing linux-image-generic (4.2.0.25.27) ...
Removing linux-image-extra-4.2.0-25-generic (4.2.0-25.30) ...
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.2.0-25-generic /boot/vmlinuz-4.2.0-25-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.2.0-25-generic /boot/vmlinuz-4.2.0-25-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.2.0-25-generic /boot/vmlinuz-4.2.0-25-generic
update-initramfs: Generating /boot/initrd.img-4.2.0-25-generic
run-parts: executing /etc/kernel/postinst.d/pm-utils 4.2.0-25-generic /boot/vmlinuz-4.2.0-25-generic
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 4.2.0-25-generic /boot/vmlinuz-4.2.0-25-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 4.2.0-25-generic /boot/vmlinuz-4.2.0-25-generic
run-parts: executing /etc/kernel/postinst.d/zz-runlilo 4.2.0-25-generic /boot/vmlinuz-4.2.0-25-generic
Warning: LBA32 addressing assumed
Fatal: raid_setup: stat("/dev/sdb")
run-parts: /etc/kernel/postinst.d/zz-runlilo exited with return code 1
dpkg: error processing package linux-image-extra-4.2.0-25-generic (--remove):
subprocess installed post-removal script returned error exit status 1
Removing linux-image-4.2.0-25-generic (4.2.0-25.30) ...
Examining /etc/kernel/prerm.d.
run-parts: executing /etc/kernel/prerm.d/dkms 4.2.0-25-generic /boot/vmlinuz-4.2.0-25-generic
dkms: removing: vboxhost 5.0.12 (4.2.0-25-generic) (x86_64)
-------- Uninstall Beginning --------
Module: vboxhost
Version: 5.0.12
Kernel: 4.2.0-25-generic (x86_64)
-------------------------------------
Status: Before uninstall, this module version was ACTIVE on this kernel.
vboxdrv.ko:
- Uninstallation
- Deleting from: /lib/modules/4.2.0-25-generic/updates/dkms/
- Original module
- No original module was found for this module on this kernel.
- Use the dkms install command to reinstall any previous module version.
vboxnetflt.ko:
- Uninstallation
- Deleting from: /lib/modules/4.2.0-25-generic/updates/dkms/
- Original module
- No original module was found for this module on this kernel.
- Use the dkms install command to reinstall any previous module version.
vboxnetadp.ko:
- Uninstallation
- Deleting from: /lib/modules/4.2.0-25-generic/updates/dkms/
- Original module
- No original module was found for this module on this kernel.
- Use the dkms install command to reinstall any previous module version.
vboxpci.ko:
- Uninstallation
- Deleting from: /lib/modules/4.2.0-25-generic/updates/dkms/
- Original module
- No original module was found for this module on this kernel.
- Use the dkms install command to reinstall any previous module version.
depmod....
DKMS: uninstall completed.
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.2.0-25-generic /boot/vmlinuz-4.2.0-25-generic
update-initramfs: Deleting /boot/initrd.img-4.2.0-25-generic
run-parts: executing /etc/kernel/postrm.d/zz-runlilo 4.2.0-25-generic /boot/vmlinuz-4.2.0-25-generic
Warning: LBA32 addressing assumed
Fatal: raid_setup: stat("/dev/sdb")
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.2.0-25-generic /boot/vmlinuz-4.2.0-25-generic
Generating grub configuration file ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-4.2.0-23-generic
Found initrd image: /boot/initrd.img-4.2.0-23-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
Found Windows 7 (loader) on /dev/sda1
Found Ubuntu 14.04.3 LTS (14.04) on /dev/sda5
done
The link /vmlinuz is a damaged link
Removing symbolic link vmlinuz
you may need to re-run your boot loader[grub]
The link /initrd.img is a damaged link
Removing symbolic link initrd.img
you may need to re-run your boot loader[grub]
Removing linux-firmware (1.149.3) ...
Errors were encountered while processing:
linux-image-extra-4.2.0-25-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
Failed to perform requested operation on package. Trying to recover:
Current status: 1 (+1) broken.
Intenté instalarlo para ver si eso solucionaba el problema:
$ sudo apt-get install linux-image-4.2.0-25-generic
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
fdutils linux-doc-4.2.0 linux-source-4.2.0 linux-tools
The following packages will be REMOVED:
linux-image-extra-4.2.0-25-generic
The following NEW packages will be installed:
linux-image-4.2.0-25-generic
0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0 B/17.3 MB of archives.
After this operation, 112 MB disk space will be freed.
Do you want to continue? [Y/n] y
debconf: unable to initialize frontend: Dialog
debconf: (Dialog frontend will not work on a dumb terminal, an emacs shell buffer, or without a controlling terminal.)
debconf: falling back to frontend: Readline
(Reading database ... 201526 files and directories currently installed.)
Removing linux-image-extra-4.2.0-25-generic (4.2.0-25.30) ...
depmod: FATAL: could not load /boot/System.map-4.2.0-25-generic: No such file or directory
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.2.0-25-generic /boot/vmlinuz-4.2.0-25-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.2.0-25-generic /boot/vmlinuz-4.2.0-25-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.2.0-25-generic /boot/vmlinuz-4.2.0-25-generic
update-initramfs: Generating /boot/initrd.img-4.2.0-25-generic
depmod: WARNING: could not open /var/tmp/mkinitramfs_2vAXLr/lib/modules/4.2.0-25-generic/modules.order: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_2vAXLr/lib/modules/4.2.0-25-generic/modules.builtin: No such file or directory
run-parts: executing /etc/kernel/postinst.d/pm-utils 4.2.0-25-generic /boot/vmlinuz-4.2.0-25-generic
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 4.2.0-25-generic /boot/vmlinuz-4.2.0-25-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 4.2.0-25-generic /boot/vmlinuz-4.2.0-25-generic
run-parts: executing /etc/kernel/postinst.d/zz-runlilo 4.2.0-25-generic /boot/vmlinuz-4.2.0-25-generic
Warning: LBA32 addressing assumed
Fatal: raid_setup: stat("/dev/sdb")
run-parts: /etc/kernel/postinst.d/zz-runlilo exited with return code 1
dpkg: error processing package linux-image-extra-4.2.0-25-generic (--remove):
subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
linux-image-extra-4.2.0-25-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
y volví a intentar eliminarlo:
$ sudo apt-get remove linux-image-4.2.0-25-generic
Building dependency tree
Reading state information... Done
Package 'linux-image-4.2.0-25-generic' is not installed, so not removed
The following packages will be REMOVED:
linux-image-extra-4.2.0-25-generic
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 162 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 201526 files and directories currently installed.)
Removing linux-image-extra-4.2.0-25-generic (4.2.0-25.30) ...
depmod: FATAL: could not load /boot/System.map-4.2.0-25-generic: No such file or directory
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.2.0-25-generic /boot/vmlinuz-4.2.0-25-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.2.0-25-generic /boot/vmlinuz-4.2.0-25-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.2.0-25-generic /boot/vmlinuz-4.2.0-25-generic
update-initramfs: Generating /boot/initrd.img-4.2.0-25-generic
depmod: WARNING: could not open /var/tmp/mkinitramfs_RhzV1u/lib/modules/4.2.0-25-generic/modules.order: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_RhzV1u/lib/modules/4.2.0-25-generic/modules.builtin: No such file or directory
run-parts: executing /etc/kernel/postinst.d/pm-utils 4.2.0-25-generic /boot/vmlinuz-4.2.0-25-generic
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 4.2.0-25-generic /boot/vmlinuz-4.2.0-25-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 4.2.0-25-generic /boot/vmlinuz-4.2.0-25-generic
run-parts: executing /etc/kernel/postinst.d/zz-runlilo 4.2.0-25-generic /boot/vmlinuz-4.2.0-25-generic
Warning: LBA32 addressing assumed
Fatal: raid_setup: stat("/dev/sdb")
run-parts: /etc/kernel/postinst.d/zz-runlilo exited with return code 1
dpkg: error processing package linux-image-extra-4.2.0-25-generic (--remove):
subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
linux-image-extra-4.2.0-25-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
para información adicional:
$ apt-cache policy linux-image-generic
linux-image-generic:
Installed: (none)
Candidate: 4.2.0.25.27
Version table:
4.2.0.25.27 0
500 http://us.archive.ubuntu.com/ubuntu/ wily-updates/main amd64 Packages
500 http://security.ubuntu.com/ubuntu/ wily-security/main amd64 Packages
4.2.0.16.18 0
500 http://us.archive.ubuntu.com/ubuntu/ wily/main amd64 Packages
Respuesta1
Creo que resolví mi problema: busqué en esos registros de fallas y vi algunos errores de lilo.
Fatal: raid_setup: stat("/dev/sdb")
run-parts: /etc/kernel/postinst.d/zz-runlilo exited with return code 1
(Pensé) no estaba usando lilo porque falló durante la instalación de Ubuntu y en su lugar cambié a grub. pero aparentemente el sistema cree que lilo está instalado/activo. El /etc/lilo.conf
archivo apuntaba a ubicaciones antiguas. Cambié el nombre de mi /etc/lilo.conf
archivo y lo volví a ejecutar liloconfig
y ahora dpkg
no falla al intentar desinstalar 4.2.0-25 o instalar otros paquetes.