我正在尝试在 Ubuntu 22.04.3 系统新安装中安装 rcraid-dkms。当我创建
安装 rcraid-dkms
,由于找不到任何 .h 头文件,该过程导致编译错误,而我对 Linux 系统的了解非常基础。解决方案可能很简单,但我需要帮助。
更新。-
我之前部署了 build-essential 数据包,并且我的系统中安装了内核头文件。
编译日志是...
DKMS make.log for rcraid-8.1.0 for kernel 6.2.0-34-generic (x86_64)
jue 12 oct 2023 09:22:22 CEST
make: se entra en el directorio '/var/lib/dkms/rcraid/8.1.0/build/src'
make -C /lib/modules/6.2.0-34-generic/build M=/var/lib/dkms/rcraid/8.1.0/build/src
make[1]: se entra en el directorio '/usr/src/linux-headers-6.2.0-34-generic'
warning: the compiler differs from the one used to build the kernel
The kernel was built by: x86_64-linux-gnu-gcc-11 (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
You are using: gcc-11 (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
ln -sf `basename /var/lib/dkms/rcraid/8.1.0/build/src/rcblob.x86_64.o .o` /var/lib/dkms/rcraid/8.1.0/build/src/rcblob.x86_64.o
CC [M] /var/lib/dkms/rcraid/8.1.0/build/src/rc_init.o
CC [M] /var/lib/dkms/rcraid/8.1.0/build/src/rc_msg.o
CC [M] /var/lib/dkms/rcraid/8.1.0/build/src/rc_mem_ops.o
CC [M] /var/lib/dkms/rcraid/8.1.0/build/src/rc_event.o
CC [M] /var/lib/dkms/rcraid/8.1.0/build/src/rc_config.o
CC [M] /var/lib/dkms/rcraid/8.1.0/build/src/vers.o
/var/lib/dkms/rcraid/8.1.0/build/src/rc_config.c:11:10: fatal error: linux/genhd.h: No existe el archivo o el directorio
11 | #include <linux/genhd.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [scripts/Makefile.build:260: /var/lib/dkms/rcraid/8.1.0/build/src/rc_config.o] Error 1
make[2]: *** Se espera a que terminen otras tareas....
In file included from /var/lib/dkms/rcraid/8.1.0/build/src/rc.h:97,
from /var/lib/dkms/rcraid/8.1.0/build/src/rc_mem_ops.c:43:
/var/lib/dkms/rcraid/8.1.0/build/src/rc_msg_platform.h:30:10: fatal error: stdarg.h: No existe el archivo o el directorio
30 | #include <stdarg.h>
| ^~~~~~~~~~
compilation terminated.
In file included from /var/lib/dkms/rcraid/8.1.0/build/src/rc.h:97,
from /var/lib/dkms/rcraid/8.1.0/build/src/rc_event.c:25:
/var/lib/dkms/rcraid/8.1.0/build/src/rc_msg_platform.h:30:10: fatal error: stdarg.h: No existe el archivo o el directorio
30 | #include <stdarg.h>
| ^~~~~~~~~~
In file included from /var/lib/dkms/rcraid/8.1.0/build/src/rc.h:97,
from /var/lib/dkms/rcraid/8.1.0/build/src/rc_msg.c:22:
/var/lib/dkms/rcraid/8.1.0/build/src/rc_msg_platform.h:30:10: fatal error: stdarg.h: No existe el archivo o el directorio
30 | #include <stdarg.h>
| ^~~~~~~~~~
In file included from /var/lib/dkms/rcraid/8.1.0/build/src/rc.h:97,
from /var/lib/dkms/rcraid/8.1.0/build/src/rc_init.c:38:
/var/lib/dkms/rcraid/8.1.0/build/src/rc_msg_platform.h:30:10: fatal error: stdarg.h: No existe el archivo o el directorio
30 | #include <stdarg.h>
| ^~~~~~~~~~
compilation terminated.
compilation terminated.
compilation terminated.
make[2]: *** [scripts/Makefile.build:260: /var/lib/dkms/rcraid/8.1.0/build/src/rc_mem_ops.o] Error 1
make[2]: *** [scripts/Makefile.build:260: /var/lib/dkms/rcraid/8.1.0/build/src/rc_event.o] Error 1
make[2]: *** [scripts/Makefile.build:260: /var/lib/dkms/rcraid/8.1.0/build/src/rc_msg.o] Error 1
make[2]: *** [scripts/Makefile.build:260: /var/lib/dkms/rcraid/8.1.0/build/src/rc_init.o] Error 1
make[1]: *** [Makefile:2026: /var/lib/dkms/rcraid/8.1.0/build/src] Error 2
make[1]: se sale del directorio '/usr/src/linux-headers-6.2.0-34-generic'
make: *** [Makefile:68: module] Error 2
make: se sale del directorio '/var/lib/dkms/rcraid/8.1.0/build/src'`
有谁能够帮助我?