ubuntu22.04安装bcc
遇到问题:
1 | LD vmlinux BTFIDS vmlinux FAILED: load BTF from vmlinux: No such file or directory make: *** [Makefile:1226: vmlinux] Error 255 make: *** Deleting file 'vmlinux' |
尝试方法:
- 在”scripts\pahole-flags.sh”文件下添加
1 | if [ "${pahole_ver}" -ge "124" ]; then |
失败
再次开始发现是因为在设置.config的时候不知道为什么出现了问题,然后make的时候出现[n/y/m]的选择也选择错误。最后再来一次正确设置就没问题了。
每次重启后需要重新编译内核,但是又出现了问题

查询后发现是wsl内存设置太小的问题,找到.wslconfig,修改为:
1 | [wsl2] |
每次开始前:
1 | export KERNELRELEASE=$(uname -r) |