lb-from-scratch
lb-from-scratch copied to clipboard
make: bpftool: Command not found
Hi there,
I try your steps and when I do the Make in container get the error :
bpftool net detach xdpgeneric dev eth0 make: bpftool: Command not found make: *** [Makefile:2: xdp] Error 127
also when I clone the repo the only thing different I did was to change in .git and .gitsubmodules to the URL of the git repo of libbpf submodules like this : https://github.com/libbpf/libbpf.git
hello, I manage to clone the repo complete with the submodules without any modification, but still have the make error.
thanks!
In case you're still looking for advice, I had to do the following:
sudo apt install linux-tools-common`
then when I run:
bpftool --help
I received an error message like:
WARNING: bpftool not found for kernel 5.4.0-104
You may need to install the following packages for this specific kernel:
linux-tools-5.4.0-104-generic
linux-cloud-tools-5.4.0-104-generic
You may also want to install one of the following packages to keep up to date:
linux-tools-generic
linux-cloud-tools-generic
So then I installs tools for my kernel via:
sudo apt install linux-tools-5.4.0-104-generic
and then bpftool --help
worked.
I'm trying to do the same for linux 6.2.0+ and have also seen:
WARNING: bpftool not found for kernel 6.2.0+
But installing tools for my kernel via:
sudo apt install linux-tools-6.2.0+
doesn't work as it's unable to locate package linux-tools-6.2.0
I tried to install bpftool as a submodule following https://github.com/libbpf/bpftool#dependencies but it still doesn't work...
If running bpftool
returns error with a message like bpftool not found for kernel v...
try installing bpftool from source:
https://github.com/libbpf/bpftool/blob/master/README.md
The process would be like this:
rm /usr/sbin/bpftool
apt update && apt install -y git
cd / && git clone --recurse-submodules https://github.com/libbpf/bpftool.git
cd bpftool/src
make install
ln -s /usr/local/sbin/bpftool /usr/sbin/bpftool