![卸载 dattobd-dkms 时出现的问题](https://linux22.com/image/1178316/%E5%8D%B8%E8%BD%BD%20dattobd-dkms%20%E6%97%B6%E5%87%BA%E7%8E%B0%E7%9A%84%E9%97%AE%E9%A2%98.png)
Configurazione di dattobd-dkms (0.10.15-29.1ubuntu20.04)...
Removing old dattobd-0.10.15 DKMS files...
------------------------------
Deleting module version: 0.10.15
completely from the DKMS tree.
------------------------------
Done.
Loading new dattobd-0.10.15 DKMS files...
Building for 5.8.0-29-generic
Building initial module for 5.8.0-29-generic
ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/dattobd-dkms.0.crash'
Error! Bad return status for module build on kernel: 5.8.0-29-generic (x86_64)
Consult /var/lib/dkms/dattobd/0.10.15/build/make.log for more information.
dpkg: errore nell'elaborare il pacchetto dattobd-dkms (--configure):
il sottoprocesso installato pacchetto dattobd-dkms script post-installation ha restituito lo stato di errore 10
Si sono verificati degli errori nell'elaborazione:
dattobd-dkms
E: Sub-process /usr/bin/dpkg returned an error code (1)
这是崩溃日志:
$ cat /var/crash/dattobd-dkms.0.crash
ProblemType: Package
DKMSBuildLog:
DKMS make.log for dattobd-0.10.15 for kernel 5.8.0-29-generic (x86_64)
mer 25 nov 2020, 16:44:53, CET
make: ingresso nella directory «/usr/src/linux-headers-5.8.0-29-generic»
CC [M] /var/lib/dkms/dattobd/0.10.15/build/dattobd.o
In file included from ./include/linux/umh.h:4,
from ./include/linux/kmod.h:9,
from ./include/linux/module.h:16,
from /var/lib/dkms/dattobd/0.10.15/build/includes.h:10,
from /var/lib/dkms/dattobd/0.10.15/build/dattobd.c:7:
/var/lib/dkms/dattobd/0.10.15/build/dattobd.c: In function ‘__tracer_setup_snap’:
./include/linux/gfp.h:297:20: warning: passing argument 1 of ‘blk_alloc_queue’ makes pointer from integer without a cast [-Wint-conversion]
297 | #define GFP_KERNEL (__GFP_RECLAIM | __GFP_IO | __GFP_FS)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| unsigned int
/var/lib/dkms/dattobd/0.10.15/build/dattobd.c:3574:34: note: in expansion of macro ‘GFP_KERNEL’
3574 | dev->sd_queue = blk_alloc_queue(GFP_KERNEL);
| ^~~~~~~~~~
In file included from /var/lib/dkms/dattobd/0.10.15/build/includes.h:12,
from /var/lib/dkms/dattobd/0.10.15/build/dattobd.c:7:
./include/linux/blkdev.h:1174:55: note: expected ‘blk_qc_t (*)(struct request_queue *, struct bio *)’ {aka ‘unsigned int (*)(struct request_queue *, struct bio *)’} but argument is of type ‘unsigned int’
1174 | struct request_queue *blk_alloc_queue(make_request_fn make_request, int node_id);
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~
/var/lib/dkms/dattobd/0.10.15/build/dattobd.c:3574:18: error: too few arguments to function ‘blk_alloc_queue’
3574 | dev->sd_queue = blk_alloc_queue(GFP_KERNEL);
| ^~~~~~~~~~~~~~~
In file included from /var/lib/dkms/dattobd/0.10.15/build/includes.h:12,
from /var/lib/dkms/dattobd/0.10.15/build/dattobd.c:7:
./include/linux/blkdev.h:1174:23: note: declared here
1174 | struct request_queue *blk_alloc_queue(make_request_fn make_request, int node_id);
| ^~~~~~~~~~~~~~~
/var/lib/dkms/dattobd/0.10.15/build/dattobd.c:3583:2: error: implicit declaration of function ‘blk_queue_make_request’; did you mean ‘blk_queue_max_segments’? [-Werror=implicit-function-declaration]
3583 | blk_queue_make_request(dev->sd_queue, snap_mrf);
| ^~~~~~~~~~~~~~~~~~~~~~
| blk_queue_max_segments
/var/lib/dkms/dattobd/0.10.15/build/dattobd.c: In function ‘agent_init’:
/var/lib/dkms/dattobd/0.10.15/build/dattobd.c:5165:51: error: passing argument 4 of ‘proc_create’ from incompatible pointer type [-Werror=incompatible-pointer-types]
5165 | info_proc = proc_create(INFO_PROC_FILE, 0, NULL, &dattobd_proc_fops);
| ^~~~~~~~~~~~~~~~~~
| |
| const struct file_operations *
In file included from /var/lib/dkms/dattobd/0.10.15/build/includes.h:16,
from /var/lib/dkms/dattobd/0.10.15/build/dattobd.c:7:
./include/linux/proc_fs.h:107:122: note: expected ‘const struct proc_ops *’ but argument is of type ‘const struct file_operations *’
107 | struct proc_dir_entry *proc_create(const char *name, umode_t mode, struct proc_dir_entry *parent, const struct proc_ops *proc_ops);
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
cc1: some warnings being treated as errors
make[1]: *** [scripts/Makefile.build:290: /var/lib/dkms/dattobd/0.10.15/build/dattobd.o] Errore 1
make: *** [Makefile:1780: /var/lib/dkms/dattobd/0.10.15/build] Errore 2
make: uscita dalla directory «/usr/src/linux-headers-5.8.0-29-generic»
DKMSKernelVersion: 5.8.0-29-generic
Date: Wed Nov 25 16:44:56 2020
DuplicateSignature: dkms:dattobd-dkms:0.10.15-29.1ubuntu20.04:/var/lib/dkms/dattobd/0.10.15/build/dattobd.c:3574:18: error: too few arguments to function ‘blk_alloc_queue’
Package: dattobd-dkms 0.10.15-29.1ubuntu20.04
PackageVersion: 0.10.15-29.1ubuntu20.04
SourcePackage: dattobd-dkms
Title: dattobd-dkms 0.10.15-29.1ubuntu20.04: dattobd kernel module failed to build
答案1
请删除以下文件后卸载。/var/lib/dpkg/info/dattobd-dkms.prerm
该问题已通过以下代码修复。 https://github.com/elastio/elastio-snap