当前位置: 首页 > 工具软件 > ko-build > 使用案例 >

【LKM】make 错误:make -C /lib/modules/4.15.0-58-generic/build SUBDIRS=/xxx

公孙成仁
2023-12-01

错误日志:

$ make
make -C /lib/modules/4.15.0-58-generic/build SUBDIRS=/xxxx/3-netlink modules
make[1]: Entering directory '/usr/src/linux-headers-4.15.0-58-generic'
Makefile:986: "Cannot use CONFIG_STACK_VALIDATION=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel"
  CC [M]  /xxxx/3-netlink/1-mynlkernel.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /xxxx/3-netlink/1-mynlkernel.mod.o
  LD [M]  /xxxx/3-netlink/1-mynlkernel.ko
make[1]: Leaving directory '/usr/src/linux-headers-4.15.0-58-generic'

解决办法:

sudo apt-get install libelf-dev

 

再make就没这个错误了

 

参考:https://github.com/coolsnowwolf/lede/issues/384

 类似资料: