apt-get은 linux-image-4.2.0-25-generic을 설치/제거할 수 없습니다.

apt-get은 linux-image-4.2.0-25-generic을 설치/제거할 수 없습니다.

Xubuntu 15.10 시스템에서 패키지( jsonlint)를 설치하려고 했는데 apt-get설치 오류로 인해 실패했습니다 linux-image-4.2.0-25-generic. 이는 2016년 1월 15일 15.10의 새로운 새로 설치였습니다.

나는 독립형을 시도했다

sudo apt-get install linux-image-4.2.0-25-generic

그리고 그것은 실패합니다. 또한 제거할 수 없습니다 linux-image-4.2.0-25-generic. linux-image-4.2.0-23-generic에서 활성화되어 /boot있고 를 통해 올바르게 부팅되지만 grub이러한 깨진 -25 아티팩트로 인해 업데이트가 불가능합니다.

커널을 제거하거나 설치할 수 없습니다도움이 되지 않았다

다음은 설치/제거 시도에 대한 로그입니다. 나는 lilo를 사용하지 않기 때문에 이러한 오류가 무엇을 의미하는지, 어떻게 무시하는지 잘 모르겠습니다.

다른 패키지를 설치할 수 있도록 이를 정리하려면 어떻게 해야 합니까? apt-get --force-yes위험할 것 같은데; 더 좋은 방법이 있나요?

이전 설치가 실패한 후 제거하려고 했습니다.

$ 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.

패치가 적용되는지 확인하기 위해 설치를 시도했습니다.

$ 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)

그리고 나는 그것을 제거하려고 다시 시도했습니다.

$ 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)

추가 정보:

$ 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

답변1

제 생각에는 문제를 해결한 것 같습니다. 실패 로그를 조사한 결과 일부 lilo 오류가 발견되었습니다.

Fatal: raid_setup: stat("/dev/sdb")
run-parts: /etc/kernel/postinst.d/zz-runlilo exited with return code 1

나는 Ubuntu 설치 중에 Lilo가 실패하고 대신 grub으로 전환했기 때문에 lilo를 사용하지 않고 있다고 생각했습니다. 그러나 분명히 시스템은 lilo가 설치/활성화되어 있다고 생각합니다. 파일 /etc/lilo.conf이 이전 위치를 가리켰습니다. 파일 이름을 바꾸고 /etc/lilo.conf다시 실행했는데 liloconfig이제 dpkg4.2.0-25를 제거하거나 다른 패키지를 설치하려고 하면 충돌이 발생하지 않습니다.

관련 정보