web-dev-qa-db-ja.com

linux-image-3.16.0-34-genericおよびlinux-image-extra-3.16.0-34-genericの削除にヘルプが必要

だから私はこれについて投稿しなければならないように思われますが、主に修正なしでは新しいソフトウェアをインストールしたりアップデートを実行したりできないため、この問題を修正しようとする手助けが必要です。何らかの理由で、カーネルの1つが完全にアンインストールされてはいけないため(linux-image-3.16.0-34-generic)、最初に思いついたことを試みました:apt-get -f install ...失敗し、これを与えます:

cictrone@cictrone:~$ Sudo apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  linux-image-3.16.0-34-generic linux-image-extra-3.16.0-34-generic
0 upgraded, 0 newly installed, 2 to remove and 14 not upgraded.
7 not fully installed or removed.
After this operation, 201 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 241430 files and directories currently installed.)
Removing linux-image-extra-3.16.0-34-generic (3.16.0-34.47~14.04.1) ...
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
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/dkms 3.16.0-34-generic /boot/vmlinuz-3.16.0-34-generic
Error! echo
Your kernel headers for kernel 3.16.0-34-generic cannot be found at
/lib/modules/3.16.0-34-generic/build or /lib/modules/3.16.0-34-generic/source.
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_raVmra/lib/modules/3.16.0-34-generic/modules.order: No such file or directory
depmod: WARNING: could not open /tmp/mkinitramfs_raVmra/lib/modules/3.16.0-34-generic/modules.builtin: No such file or directory
run-parts: executing /etc/kernel/postinst.d/pm-utils 3.16.0-34-generic /boot/vmlinuz-3.16.0-34-generic
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-update-grub 3.16.0-34-generic /boot/vmlinuz-3.16.0-34-generic
/usr/sbin/grub-mkconfig: 39: /etc/default/grub: desktop-image=/home    /cictrone/Pictures/grub-splash.jpg: not found
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 127
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-3.16.0-34-generic (3.16.0-34.47~14.04.1) ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.16.0-34-generic /boot/vmlinuz-3.16.0-34-generic
update-initramfs: Deleting /boot/initrd.img-3.16.0-34-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.16.0-34-generic /boot/vmlinuz-3.16.0-34-generic
/usr/sbin/grub-mkconfig: 39: /etc/default/grub: desktop-image=/home/cictrone/Pictures/grub-splash.jpg: not found
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 127
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-3.16.0-34-generic.postrm line 328.
dpkg: error processing package linux-image-3.16.0-34-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
 linux-image-extra-3.16.0-34-generic
 linux-image-3.16.0-34-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

私も試しました:

  1. Sudo dpkg -C
  2. Sudo apt-get autoremove
  3. Sudo dpkg --remove
  4. Sudo dpkg --configure -a
  5. Sudo dpkg --remove --force-remove-reinstreq
  6. 須藤apt-get autoclean

私のuname -rの出力:

3.16.0-41-generic

Terranceの提案の出力:

cictrone@cictrone:~$ Sudo apt-get install linux-image-3.16.0-34-generic linux-headers-3.16.0-34-generic linux-image-extra-3.16.0-34-generic
Reading package lists... Done
Building dependency tree       
Reading state information... Done
linux-headers-3.16.0-34-generic is already the newest version.
linux-image-3.16.0-34-generic is already the newest version.    
linux-image-extra-3.16.0-34-generic is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 14 not upgraded.
7 not fully installed or removed.
Need to get 0 B/53.9 MB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
dpkg: error processing package linux-image-3.16.0-34-generic (--configure):
 package linux-image-3.16.0-34-generic is not ready for configuration
 cannot configure (current status `half-installed')
Setting up linux-image-3.16.0-43-generic (3.16.0-43.58~14.04.1) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
initrd.img(/boot/initrd.img-3.16.0-43-generic) points to /boot/initrd.img-3.16.0-43-generic
 (/boot/initrd.img-3.16.0-43-generic) -- doing nothing at /var/lib/dpkg/info/linux-image-3.16.0-43-generic.postinst line 491.
vmlinuz(/boot/vmlinuz-3.16.0-43-generic) points to /boot/vmlinuz-3.16.0-43-generic
 (/boot/vmlinuz-3.16.0-43-generic) -- doing nothing at /var/lib/dpkg/info/linux-image-3.16.0-43-generic.postinst line 491.
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.16.0-43-generic /boot/vmlinuz-3.16.0-43-generic
run-parts: executing /etc/kernel/postinst.d/dkms 3.16.0-43-generic /boot/vmlinuz-3.16.0-43-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.16.0-43-generic /boot/vmlinuz-3.16.0-43-generic
update-initramfs: Generating /boot/initrd.img-3.16.0-43-generic
run-parts: executing /etc/kernel/postinst.d/pm-utils 3.16.0-43-generic /boot/vmlinuz-3.16.0-43-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 3.16.0-43-generic /boot/vmlinuz-3.16.0-43-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 3.16.0-43-generic /boot/vmlinuz-3.16.0-43-generic
/usr/sbin/grub-mkconfig: 39: /etc/default/grub: desktop-image=/home/cictrone/Pictures/grub-splash.jpg: not found
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 127
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-3.16.0-43-generic.postinst line 1025.
dpkg: error processing package linux-image-3.16.0-43-generic (--configure):
 subprocess installed post-installation script returned error exit status 2
Setting up grub-pc (2.02~beta2-9ubuntu1.3+elementary10~ubuntu0.3.1) ...
/var/lib/dpkg/info/grub-pc.config: 39: /etc/default/grub: desktop-image=/home/cictrone/Pictures/grub-splash.jpg: not found
dpkg: error processing package grub-pc (--configure):
 subprocess installed post-installation script returned error exit status 127
dpkg: dependency problems prevent configuration of linux-image-extra-3.16.0-43-generic:
 linux-image-extra-3.16.0-43-generic depends on linux-image-3.16.0-43-generic; however:
  Package linux-image-3.16.0-43-generic is not configured yet.

dpkg: error processing package linux-image-extra-3.16.0-43-generic (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-image-generic-lts-utopic:
 linux-image-generic-lts-utopic depends on linux-image-3.16.0-43-generic; however:
  Package linux-image-3.16.0-43-generic is not configured yet.
 linux-image-generic-lts-utopic depends on linux-image-extra-3.16.0-43-generic; however:
  Package linux-image-extra-3.16.0-43-generic is not configured yet.

dpkg: error processing package linux-image-generic-lts-utopic (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-generic-lts-utopic:
 linux-generic-lts-utopic depends on linux-image-generic-No apport report written because MaxReports is reached already
 No apport report written because MaxReports is reached already
 No apport report written because MaxReports is reached already
 No apport report written because MaxReports is reached already
lts-utopic (= 3.16.0.43.34); however:
 Package linux-image-generic-lts-utopic is not configured yet.
dpkg: error processing package linux-generic-lts-utopic (--configure):
 dependency problems - leaving unconfigured
dpkg: error processing package linux-image-extra-3.16.0-34-generic (--configure):
 package linux-image-extra-3.16.0-34-generic is not ready for configuration
 cannot configure (current status `half-installed')
    Errors were encountered while processing:
     linux-image-3.16.0-34-generic
     linux-image-3.16.0-43-generic
     grub-pc
     linux-image-extra-3.16.0-43-generic
     linux-image-generic-lts-utopic
     linux-generic-lts-utopic
     linux-image-extra-3.16.0-34-generic
    E: Sub-process /usr/bin/dpkg returned an error code (1)

以下は、再インストールコマンド(apt-get)を発行した後のremoveコマンドの出力です。

cictrone@cictrone:~$ Sudo apt-get remove linux-image-3.16.0-34-generic linux-headers-3.16.0-34-generic linux-image-extra-3.16.0-34-generic
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following package was automatically installed and is no longer required:
  linux-headers-3.16.0-34
Use 'apt-get autoremove' to remove it.
The following packages will be REMOVED:
  linux-headers-3.16.0-34-generic linux-image-3.16.0-34-generic
  linux-image-extra-3.16.0-34-generic
0 upgraded, 0 newly installed, 3 to remove and 15 not upgraded.
7 not fully installed or removed.
After this operation, 215 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 271286 files and directories currently installed.)
Removing linux-image-extra-3.16.0-34-generic (3.16.0-34.47~14.04.1) ...
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/dkms 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
run-parts: executing /etc/kernel/postinst.d/pm-utils 3.16.0-34-generic /boot/vmlinuz-3.16.0-34-generic
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-update-grub 3.16.0-34-generic /boot/vmlinuz-3.16.0-34-generic
/usr/sbin/grub-mkconfig: 39: /etc/default/grub: desktop-image=/home/cictrone/Pictures/grub-splash.jpg: not found
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 127
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-3.16.0-34-generic (3.16.0-34.47~14.04.1) ...
Examining /etc/kernel/prerm.d.
run-parts: executing /etc/kernel/prerm.d/dkms 3.16.0-34-generic /boot/vmlinuz-3.16.0-34-generic
dkms: removing: bcmwl 6.30.223.248+bdcom (3.16.0-34-generic) (x86_64)

-------- Uninstall Beginning --------
Module:  bcmwl
Version: 6.30.223.248+bdcom
Kernel:  3.16.0-34-generic (x86_64)
-------------------------------------

Status: Before uninstall, this module version was ACTIVE on this kernel.

wl.ko:
 - Uninstallation
   - Deleting from: /lib/modules/3.16.0-34-generic/extra/
 - 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 3.16.0-34-generic /boot/vmlinuz-3.16.0-34-generic
update-initramfs: Deleting /boot/initrd.img-3.16.0-34-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.16.0-34-generic /boot/vmlinuz-3.16.0-34-generic
/usr/sbin/grub-mkconfig: 39: /etc/default/grub: desktop-image=/home/cictrone/Pictures/grub-splash.jpg: not found
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 127
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-3.16.0-34-generic.postrm line 328.
dpkg: error processing package linux-image-3.16.0-34-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
Removing linux-headers-3.16.0-34-generic (3.16.0-34.47~14.04.1) ...
Errors were encountered while processing:
 linux-image-extra-3.16.0-34-generic
 linux-image-3.16.0-34-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

これらのubuntu tweaksツール(インストールできました)もカーネルを認識しますが、端末と同じエラーを表示します。

どんな助けでも感謝します、ありがとう。

****解決済み****

カーネルの問題が適性を維持する原因ではないことが判明しました。実際にはグラブでした。特に行:

/usr/sbin/grub-mkconfig: 39: /etc/default/grub: desktop-image=/home/cictrone/Pictures/grub-splash.jpg: not found

ファイルに移動して問題のある行を削除し、Terrenceの提案を実行しましたが、すべて修正されました。みんな、ありがとう。

2

そのカーネルを再インストールしてから削除してください。

再インストール:

Sudo apt-get install --reinstall linux-image-3.16.0-34-generic linux-headers-3.16.0-34-generic linux-image-extra-3.16.0-34-generic

削除:

Sudo apt-get remove linux-image-3.16.0-34-generic linux-headers-3.16.0-34-generic linux-image-extra-3.16.0-34-generic
1
Terrance

buntu-Tweak を試してください。古いカーネルをうまく削除してくれます。

0
Organic Marble

実行中のカーネルとは何ですか?

これに注意する必要があります:

run-parts: executing /etc/kernel/prerm.d/dkms 3.16.0-34-generic /boot/vmlinuz-3.16.0-34-generic
dkms: removing: bcmwl 6.30.223.248+bdcom (3.16.0-34-generic) (x86_64)

-------- Uninstall Beginning --------
Module:  bcmwl
Version: 6.30.223.248+bdcom
Kernel:  3.16.0-34-generic (x86_64)
-------------------------------------

Status: Before uninstall, this module version was ACTIVE on this kernel.
0
RobinHood