在编写 hello world 内核模块时,insmod 命令显示此错误。我尝试了所有方法,但都不起作用。
~$ cd Desktop
~/Desktop$ cd hellomodule
~/Desktop/hellomodule$ make
make -C /lib/modules/5.3.0-45-generic/build M=/home/shivang_official/Desktop/hellomodule modules
make[1]: Entering directory '/usr/src/linux-headers-5.3.0-45-generic'
Building modules, stage 2.
MODPOST 1 modules
make[1]: Leaving directory '/usr/src/linux-headers-5.3.0-45-generic'
~/Desktop/hellomodule$ su
Password:
/Desktop/hellomodule# insmod ./hello.ko
insmod: ERROR: could not insert module ./hello.ko: Operation not permitted