Sample Header Ad - 728x90

What tells dpkg to rebuild/add a driver using dkms when removing/adding headers?

0 votes
0 answers
37 views
when I try to install qemu-kvm I get an error message that my own driver can not be added again to the DMKS tree. $ sudo apt -y install qemu-kvm Reading package lists... Done Building dependency tree... Done Reading state information... Done Note, selecting 'qemu-system-x86' instead of 'qemu-kvm' qemu-system-x86 is already the newest version (1:8.2.2+ds-0ubuntu1.7). The following packages were automatically installed and are no longer required: linux-headers-6.8.0-59 linux-headers-6.8.0-59-generic linux-image-6.8.0-59-generic linux-modules-6.8.0-59-generic linux-modules-extra-6.8.0-59-generic linux-tools-6.8.0-59 linux-tools-6.8.0-59-generic Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 98 not upgraded. 1 not fully installed or removed. After this operation, 0 B of additional disk space will be used. Setting up mydriver-kmd (1.1.0) ... Error! DKMS tree already contains: mydriver-1.1.0 You cannot add the same module/version combo more than once. dpkg: error processing package mydriver-kmd (--configure): installed mydriver-kmd package post-installation script subprocess returned error exit status 3 Errors were encountered while processing: mydriver-kmd The issue is that I am not trying to add a new kernel headers package or anything of that sort. It also says that qemu-system-x86 is already installed. But I am not sure what it was trying to add the mydrvier-kmd to the source tree again. So, why dpkg thinks it needs to add my driver again to the dkms tree even though it was trying to remove Linux header packages? should not it try to remove my driver instead of try to add it? What do I need to fix? How can I tell dpkg that it should not add my driver when removing Linux headers?
Asked by feeling_lonely (101 rep)
Jun 23, 2025, 10:52 PM