bcc-tools的trace提示chdir(/lib/modules/5.4.182-1.el7.elrepo.x86_64/build): No such file or directory
[root@localhost ~]# /usr/share/bcc/tools/trace -I 'net/sock.h' 'udpv6_sendmsg(struct sock *sk) (sk->sk_dport == 13568)'
modprobe: FATAL: Module kheaders not found.
chdir(/lib/modules/5.4.182-1.el7.elrepo.x86_64/build): No such file or directory
Failed to compile BPF text
需要安装kernel对应的devel包
[root@localhost yum.repos.d]# yum --enablerepo=elrepo-kernel install kernel-lt-devel
附:
elrepo的配置方式 CentOS 7.9升级内核并设置默认启动_IT架构师-CSDN博客