李天琦 2021-05-27 16:51 采纳率: 0%
浏览 1687

编译kpatch,提示gelf.h: No such file or directory

错误:

[root@ansible kpatch]# make 
make -C kpatch-build
make[1]: Entering directory `/home/gn/kpatch/kpatch-build'
gcc -MMD -MP -I../kmod/patch -Iinsn -Wall -Wsign-compare -Wconversion -Wno-sign-conversion -g -Werror   -c -o create-diff-object.o create-diff-object.c
create-diff-object.c:44:18: fatal error: gelf.h: No such file or directory
 #include <gelf.h>
                  ^
compilation terminated.
make[1]: *** [create-diff-object.o] Error 1
make[1]: Leaving directory `/home/gn/kpatch/kpatch-build'
make: *** [build-kpatch-build] Error 2
 

奇怪的是:kpatch源码中明明用到了该文件,但是在源码中没有找见gelf.h

[root@ansible kpatch]# grep "gelf.h"  -rI ./
./kpatch-build/lookup.c:#include <gelf.h>
./kpatch-build/kpatch-elf.h:#include <gelf.h>
./kpatch-build/create-diff-object.c:#include <gelf.h>

--------------------------------------------------------------------

[root@ansible kpatch]# find / -name "gelf.h"
[root@ansible kpatch]# 
--------------------------------------------------------------------

怀疑是第三方库文件,但是苦于不知道这个文件gelf的rpm包名

  • 写回答

1条回答 默认 最新

  • binger_boy 2021-09-08 17:41
    关注

    我也遇到了这个问题,安装这个包 就可以解决 libelf-dev

    评论

报告相同问题?

悬赏问题

  • ¥20 关于web前端如何播放二次加密m3u8视频的问题
  • ¥20 spring boot集成mqtt的使用问题
  • ¥15 使用百度地图api 位置函数报错?
  • ¥15 metamask如何添加TRON自定义网络
  • ¥66 关于川崎机器人调速问题
  • ¥15 winFrom界面无法打开
  • ¥30 crossover21 ARM64版本安装软件问题
  • ¥15 mymetaobjecthandler没有进入
  • ¥15 mmo能不能做客户端怪物
  • ¥15 osm下载到arcgis出错