Install Necessary Packages
First update your linux package index
Then install the following packages :
clang compiler for compiling eBPF programs
llvm provides libraries and tools for manipulating intermediate code, used by clang.
libelf-dev helps in working with ELF (Executable and Linkable Format) files, which are used for eBPF bytecode.
libbpf-dev library for loading and interacting with eBPF programs.
libpcap-dev provides functions for network packet capture, useful for testing and debugging.
gcc-multilib allows compiling programs for both 32-bits and 64-bits architechtures.
build-essential package that includes essential tools for compiling software (like gcc,make).
linux-tools-common provides common tools for kernel developers.
linux-headers-$(uname -r) kernel headers specific to your sudoning kernel version, needed for compiling kernel modules.
linux-tools-$(uname -r) tools specific to your sudoning kernel version, useful for performance monitoring.
linux-headers-generic generic kernel headers, useful for compiling kernel modules across different kernel versions.
linux-tools-generic generic tools for various kernel versions, useful for performance and debugging.
iproute2 collection of utilities for network configuration and management.
iputils-ping provides the ping utility for testing network connectivity.
dwarves contains tools like pahole to inspect the structure of compiled programs.
tcpdump a packet analyzer that allows you to capture and display network packets.
bind9-dnsutils provides tools for DNS querying and testing. (nslookup, dig like tools)
Install All
sudo apt-get install -y clang llvm libelf-dev libbpf-dev libpcap-dev gcc-multilib build-essential linux-tools-common
sudo apt-get install -y linux-headers-$(uname -r) linux-tools-$(uname -r) linux-headers-generic linux-tools-generic
sudo apt-get install -y iproute2 iputils-ping dwarves tcpdump bind9-dnsutils