0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

AUFS モジュールを消さないとlinux-headers-amd64がアンインストールできなかった時の対処

Posted at

エラー

  • aufs/4.19+20190211 でエラーになっている
$ sudo dpkg --configure -a
Setting up linux-headers-6.1.0-40-amd64 (6.1.153-1) ...
/etc/kernel/header_postinst.d/dkms:
dkms: running auto installation service for kernel 6.1.0-40-amd64.
Sign command: /usr/lib/linux-kbuild-6.1/scripts/sign-file
Signing key: /var/lib/dkms/mok.key
Public certificate (MOK): /var/lib/dkms/mok.pub
Error! The /var/lib/dkms/aufs/4.19+20190211/6.1.0-40-amd64/x86_64/dkms.conf for module aufs includes a BUILD_EXCLUSIVE directive which does not match this kernel/arch/config.
This indicates that it should not be built.
Error! One or more modules failed to install during autoinstall.
Refer to previous errors for more information.
dkms: autoinstall for kernel: 6.1.0-40-amd64 failed!
run-parts: /etc/kernel/header_postinst.d/dkms exited with return code 11
Failed to process /etc/kernel/header_postinst.d at /var/lib/dpkg/info/linux-headers-6.1.0-40-amd64.postinst line 11.
dpkg: error processing package linux-headers-6.1.0-40-amd64 (--configure):
 installed linux-headers-6.1.0-40-amd64 package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of linux-headers-amd64:
 linux-headers-amd64 depends on linux-headers-6.1.0-40-amd64 (= 6.1.153-1); however:
  Package linux-headers-6.1.0-40-amd64 is not configured yet.

dpkg: error processing package linux-headers-amd64 (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 linux-headers-6.1.0-40-amd64
 linux-headers-amd64

事前情報

AUFS モジュール側の制限 (BUILD_EXCLUSIVE) が原因。
dockerで以前使われていたが、今はoverlay2が使われているためAUFSは使われていない。

$ docker -v
Docker version 26.1.4, build 5650f9b

$ docker info | grep "Storage Driver"
 Storage Driver: overlay2

アンインストール

sudo dkms remove -m aufs -v 4.19+20190211 --all
$ sudo dkms remove -m aufs -v 4.19+20190211 --all
Module aufs-4.19+20190211 for kernel 4.19.0-11-amd64 (x86_64).
Before uninstall, this module version was ACTIVE on this kernel.

aufs.ko:
 - Uninstallation
   - Deleting from: /lib/modules/4.19.0-11-amd64/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...
Module aufs-4.19+20190211 for kernel 4.19.0-12-amd64 (x86_64).
Before uninstall, this module version was ACTIVE on this kernel.

aufs.ko:
 - Uninstallation
   - Deleting from: /lib/modules/4.19.0-12-amd64/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...
Module aufs-4.19+20190211 for kernel 4.19.0-14-amd64 (x86_64).
Before uninstall, this module version was ACTIVE on this kernel.

aufs.ko:
 - Uninstallation
   - Deleting from: /lib/modules/4.19.0-14-amd64/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...
Module aufs-4.19+20190211 for kernel 4.19.0-16-amd64 (x86_64).
Before uninstall, this module version was ACTIVE on this kernel.

aufs.ko:
 - Uninstallation
   - Deleting from: /lib/modules/4.19.0-16-amd64/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...
Module aufs-4.19+20190211 for kernel 4.19.0-17-amd64 (x86_64).
Before uninstall, this module version was ACTIVE on this kernel.

aufs.ko:
 - Uninstallation
   - Deleting from: /lib/modules/4.19.0-17-amd64/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...
Deleting module aufs-4.19+20190211 completely from the DKMS tree.

削除完了

$ sudo dpkg --configure -a
Setting up linux-headers-6.1.0-40-amd64 (6.1.153-1) ...
/etc/kernel/header_postinst.d/dkms:
dkms: running auto installation service for kernel 6.1.0-40-amd64.
dkms: autoinstall for kernel: 6.1.0-40-amd64.
Setting up linux-headers-amd64 (6.1.153-1) ...
$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
$ sudo apt autoremove
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?