Lines Matching +full:add +full:- +full:apt +full:- +full:repository
3 * [Kernel Configuration](#kernel-configuration)
5 - [Debian](#debian---binary)
6 - [Ubuntu](#ubuntu---binary)
7 - [Fedora](#fedora---binary)
8 - [Arch](#arch---binary)
9 - [Gentoo](#gentoo---portage)
10 - [openSUSE](#opensuse---binary)
11 - [RHEL](#rhel---binary)
12 - [Amazon Linux 1](#amazon-linux-1---binary)
13 - [Amazon Linux 2](#amazon-linux-2---binary)
14 - [Alpine](#alpine---binary)
15 - [WSL](#wslwindows-subsystem-for-linux---binary)
17 - [libbpf Submodule](#libbpf-submodule)
18 - [Debian](#debian---source)
19 - [Ubuntu](#ubuntu---source)
20 - [Fedora](#fedora---source)
21 - [openSUSE](#opensuse---source)
22 - [Centos](#centos---source)
23 - [Amazon Linux 1](#amazon-linux-1---source)
24 - [Amazon Linux 2](#amazon-linux-2---source)
25 - [Alpine](#alpine---source)
26 - [Arch](#arch---source)
27 * [Older Instructions](#older-instructions)
64 `/boot/config-<kernel-version>`.
68 ## Debian - Binary
70 …repository, from the source package [bpfcc](https://packages.debian.org/source/sid/bpfcc) under th…
75 echo deb http://cloudfront.debian.net/debian sid main >> /etc/apt/sources.list
76 sudo apt-get install -y bpfcc-tools libbpfcc libbpfcc-dev linux-headers-$(uname -r)
79 ## Ubuntu - Binary
82 Universe repository, as well in iovisor's PPA. The Ubuntu packages have slightly different names: w…
83 packages use `bcc` in the name (e.g. `bcc-tools`), Ubuntu packages use `bpfcc` (e.g.
84 `bpfcc-tools`).
87 - [Universe - Ubuntu Launchpad](https://bugs.launchpad.net/ubuntu/+source/bpfcc/+bug/1848137)
88 - [iovisor - BCC GitHub Issues](https://github.com/iovisor/bcc/issues/2678)
89 Currently, [building from source](#ubuntu---source) is currently the only way to get up to date pac…
96 sudo apt-get install bpfcc-tools linux-headers-$(uname -r)
99 …led in `/sbin` (`/usr/sbin` in Ubuntu 18.04) with a `-bpfcc` extension. Try running `sudo opensnoo…
103 Ubuntu's packages instead of the upstream iovisor packages (or vice-versa), the
115 sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4052245BD4284CDD
116 echo "deb https://repo.iovisor.org/apt/$(lsb_release -cs) $(lsb_release -cs) main" | sudo tee /etc/…
117 sudo apt-get update
118 sudo apt-get install bcc-tools libbcc-examples linux-headers-$(uname -r)
125 echo "deb [trusted=yes] https://repo.iovisor.org/apt/xenial xenial-nightly main" | sudo tee /etc/ap…
126 sudo apt-get update
127 sudo apt-get install bcc-tools libbcc-examples linux-headers-$(uname -r)
131 ## Fedora - Binary
135 As of Fedora 30, bcc binaries are available in the standard repository.
144 the so-called kernel lockdown (cf.
146 …ckground article](https://gehrcke.de/2019/09/running-an-ebpf-program-may-require-lifting-the-kerne…
151 Ensure that you are running a 4.2+ kernel with `uname -r`. If not, install a 4.2+ kernel from
152 http://alt.fedoraproject.org/pub/alt/rawhide-kernel-nodebug, for example:
155 sudo dnf config-manager --add-repo=http://alt.fedoraproject.org/pub/alt/rawhide-kernel-nodebug/fedo…
167 echo -e '[iovisor]\nbaseurl=https://repo.iovisor.org/yum/nightly/f27/$basearch\nenabled=1\ngpgcheck…
168 sudo dnf install bcc-tools kernel-headers kernel-devel
177 echo -e '[iovisor]\nbaseurl=https://repo.iovisor.org/yum/main/f27/$basearch\nenabled=1' | sudo tee …
178 sudo dnf install bcc-tools kernel-devel-$(uname -r) kernel-headers-$(uname -r)
181 ## Arch - Binary
185 # pacman -S bcc bcc-tools python-bcc
188 ## Gentoo - Portage
192 emerge sys-kernel/gentoo-sources
205 emerge dev-util/bcc
209 ## openSUSE - Binary
216 sudo zypper in bcc-tools bcc-examples
219 ## RHEL - Binary
221 …repository as bcc-tools. As part of the install, the following dependencies are installed: bcc.x86…
224 yum install bcc-tools
227 ## Amazon Linux 1 - Binary
229 Tested on Amazon Linux AMI release 2018.03 (kernel 4.14.88-72.73.amzn1.x86_64)
237 Tested on Amazon Linux AMI release 2018.03 (kernel 4.14.77-70.59.amzn1.x86_64)
239 sudo yum install kernel-headers-$(uname -r | cut -d'.' -f1-5)
240 sudo yum install kernel-devel-$(uname -r | cut -d'.' -f1-5)
244 ## Amazon Linux 2 - Binary
246 Tested on Amazon Linux AMI release 2021.11 (kernel 5.10.75-79.358.amzn2.x86_64)
248 sudo amazon-linux-extras install BCC
251 ## Alpine - Binary
253 As of Alpine 3.11, bcc binaries are available in the community repository:
256 sudo apk add bcc-tools bcc-doc
263 …-based tools assume that a `python` binary is available at `/usr/bin/python`, but that may not be …
266 sudo ln -s $(which python3) /usr/bin/python
274 sudo docker run --rm -it --privileged \
275 -v /lib/modules:/lib/modules:ro \
276 -v /sys:/sys:ro \
277 -v /usr/src:/usr/src:ro \
281 ## WSL(Windows Subsystem for Linux) - Binary
286 apt-get install flex bison libssl-dev libelf-dev dwarves
290 First, you will need to checkout the WSL2 Linux kernel git repository:
292 KERNEL_VERSION=$(uname -r | cut -d '-' -f 1)
293 git clone --depth 1 https://github.com/microsoft/WSL2-Linux-Kernel.git -b linux-msft-wsl-$KERNEL_VE…
294 cd WSL2-Linux-Kernel
299 cp Microsoft/config-wsl .config
309 mv /lib/modules/$KERNEL_VERSION-microsoft-standard-WSL2+/ /lib/modules/$KERNEL_VERSION-microsoft-st…
316 sudo mount -t debugfs debugfs /sys/kernel/debug
331 ## Debian - Source
335 `/etc/apt/sources.list` should include the `non-free` repository and look something like this:
338 deb http://deb.debian.org/debian sid main contrib non-free
339 deb-src http://deb.debian.org/debian sid main contrib non-free
345 apt-get update
348 sudo apt-get install arping bison clang-format cmake dh-python \
349 dpkg-dev pkg-kde-tools ethtool flex inetutils-ping iperf \
350 libbpf-dev libclang-dev libclang-cpp-dev libedit-dev libelf-dev \
351 libfl-dev libzip-dev linux-libc-dev llvm-dev libluajit-5.1-dev \
352 luajit python3-netaddr python3-pyroute2 python3-setuptools python3
364 ## Ubuntu - Source
377 echo "deb http://llvm.org/apt/$VER/ llvm-toolchain-$VER-3.7 main
378 deb-src http://llvm.org/apt/$VER/ llvm-toolchain-$VER-3.7 main" | \
379 sudo tee /etc/apt/sources.list.d/llvm.list
380 wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key | sudo apt-key add -
381 sudo apt-get update
384 sudo apt-get -y install zip bison build-essential cmake flex git libedit-dev \
385 …libllvm6.0 llvm-6.0-dev libclang-6.0-dev python zlib1g-dev libelf-dev libfl-dev python3-setuptools…
386 liblzma-dev arping netperf iperf
389 sudo apt install -y zip bison build-essential cmake flex git libedit-dev \
390 libllvm12 llvm-12-dev libclang-12-dev python zlib1g-dev libelf-dev libfl-dev python3-setuptools \
391 liblzma-dev arping netperf iperf
394 sudo apt install -y zip bison build-essential cmake flex git libedit-dev \
395 libllvm11 llvm-11-dev libclang-11-dev python3 zlib1g-dev libelf-dev libfl-dev python3-setuptools \
396 liblzma-dev arping netperf iperf
399 sudo apt install -y zip bison build-essential cmake flex git libedit-dev \
400 libllvm14 llvm-14-dev libclang-14-dev python3 zlib1g-dev libelf-dev libfl-dev python3-setuptools \
401 liblzma-dev libdebuginfod-dev arping netperf iperf
404 sudo apt install -y zip bison build-essential cmake flex git libedit-dev \
405 libllvm15 llvm-15-dev libclang-15-dev python3 zlib1g-dev libelf-dev libfl-dev python3-setuptools \
406 liblzma-dev libdebuginfod-dev arping netperf iperf libpolly-15-dev
409 sudo apt-get -y install zip bison build-essential cmake flex git libedit-dev \
410 libllvm3.7 llvm-3.7-dev libclang-3.7-dev python zlib1g-dev libelf-dev python3-setuptools \
411 liblzma-dev arping netperf iperf
414 sudo apt-get -y install luajit luajit-5.1-dev
425 cmake -DPYTHON_CMD=python3 .. # build python3 binding
432 ## CentOS-8.5 - Source
433 suppose you're running with root or add sudo first
437 dnf install -y bison cmake ethtool flex git iperf3 libstdc++-devel python3-netaddr python3-pip gcc …
438 # dnf install -y luajit luajit-devel ## if use luajit, will report some lua function(which in lua5.…
439 dnf install -y clang clang-devel llvm llvm-devel llvm-static ncurses-devel
440 dnf -y install netperf
442 ln -s /usr/bin/python3 /usr/bin/python
448 mkdir bcc-build
449 cd bcc-build/
452 cmake ../bcc -DCMAKE_INSTALL_PREFIX=/usr -DENABLE_LLVM_SHARED=1
453 make -j10
457 after install, you may add bcc directory to your $PATH, which you can add to ~/.bashrc
482 ## Fedora - Source
487 sudo dnf install -y bison cmake ethtool flex git iperf libstdc++-static \
488 python-netaddr python-pip gcc gcc-c++ make zlib-devel \
489 elfutils-libelf-devel python-cachetools
490 sudo dnf install -y luajit luajit-devel # for Lua support
491 sudo dnf install -y \
492 http://repo.iovisor.org/yum/extra/mageia/cauldron/x86_64/netperf-2.7.0-1.mga6.x86_64.rpm
500 wget http://llvm.org/releases/3.7.1/clang+llvm-3.7.1-x86_64-fedora22.tar.xz
501 sudo tar xf clang+llvm-3.7.1-x86_64-fedora22.tar.xz -C /usr/local --strip 1
504 wget http://llvm.org/releases/3.9.0/clang+llvm-3.9.0-x86_64-fedora23.tar.xz
505 sudo tar xf clang+llvm-3.9.0-x86_64-fedora23.tar.xz -C /usr/local --strip 1
508 sudo dnf install -y clang clang-devel llvm llvm-devel llvm-static ncurses-devel
520 ## openSUSE - Source
525 sudo zypper in bison cmake flex gcc gcc-c++ git libelf-devel libstdc++-devel \
526 llvm-devel clang-devel pkg-config python-devel python-setuptools python3-devel \
527 python3-setuptools
528 sudo zypper in luajit-devel # for lua support in openSUSE Leap 42.2 or later
529 sudo zypper in lua51-luajit-devel # for lua support in openSUSE Tumbleweed
536 cmake -DLUAJIT_INCLUDE_DIR=`pkg-config --variable=includedir luajit` \ # for lua support
540 cmake -DPYTHON_CMD=python3 .. # build python3 binding
547 ## Centos - Source
554 sudo yum install -y epel-release
555 sudo yum update -y
556 sudo yum groupinstall -y "Development tools"
557 sudo yum install -y elfutils-libelf-devel cmake3 git bison flex ncurses-devel
558 sudo yum install -y luajit luajit-devel # for Lua support
566 curl -LO https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.1/llvm-10.0.1.src.tar.…
567 curl -LO https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.1/clang-10.0.1.src.tar…
568 tar -xf clang-10.0.1.src.tar.xz
569 tar -xf llvm-10.0.1.src.tar.xz
571 mkdir clang-build
572 mkdir llvm-build
574 cd llvm-build
575 cmake3 -G "Unix Makefiles" -DLLVM_TARGETS_TO_BUILD="BPF;X86" \
576 -DCMAKE_BUILD_TYPE=Release ../llvm-10.0.1.src
580 cd ../clang-build
581 cmake3 -G "Unix Makefiles" -DLLVM_TARGETS_TO_BUILD="BPF;X86" \
582 -DCMAKE_BUILD_TYPE=Release ../clang-10.0.1.src
588 or install from centos-release-scl
591 yum install -y centos-release-scl
592 yum-config-manager --enable rhel-server-rhscl-7-rpms
593 yum install -y devtoolset-7 llvm-toolset-10 llvm-toolset-10-llvm-devel llvm-toolset-10-llvm-static …
594 source scl_source enable devtoolset-7 llvm-toolset-10
609 ## Amazon Linux 1 - Source
611 Tested on Amazon Linux AMI release 2018.03 (kernel 4.14.47-56.37.amzn1.x86_64)
615 # enable epel to get iperf, luajit, luajit-devel, cmake3 (cmake3 is required to support c++11)
616 sudo yum-config-manager --enable epel
618 …m install -y bison cmake3 ethtool flex git iperf libstdc++-static python-netaddr python-cachetools…
619 sudo yum install -y luajit luajit-devel
620 sudo yum install -y http://repo.iovisor.org/yum/extra/mageia/cauldron/x86_64/netperf-2.7.0-1.mga6.x…
622 sudo yum install -y ncurses-devel
625 ### Install clang 3.7.1 pre-built binaries
627 wget http://releases.llvm.org/3.7.1/clang+llvm-3.7.1-x86_64-fedora22.tar.xz
629 (cd clang* && sudo cp -R * /usr/local/)
645 sudo yum -y install kernel-devel-$(uname -r)
646 sudo mount -t debugfs debugfs /sys/kernel/debug
654 ## Amazon Linux 2 - Source
657 # enable epel to get iperf, luajit, luajit-devel, cmake3 (cmake3 is required to support c++11)
658 sudo yum-config-manager --enable epel
660 …m install -y bison cmake3 ethtool flex git iperf libstdc++-static python-netaddr python-cachetools…
661 sudo yum install -y luajit luajit-devel
662 sudo yum install -y http://repo.iovisor.org/yum/extra/mageia/cauldron/x86_64/netperf-2.7.0-1.mga6.x…
664 sudo yum install -y ncurses-devel
669 yum install -y clang llvm llvm-devel llvm-static clang-devel clang-libs
685 sudo yum -y install kernel-devel-$(uname -r)
686 sudo mount -t debugfs debugfs /sys/kernel/debug
694 ## Alpine - Source
699 sudo apk add tar git build-base iperf linux-headers llvm10-dev llvm10-static \
700 clang-dev clang-static cmake python3 flex-dev bison luajit-dev elfutils-dev \
701 zlib-dev
710 cmake -DPYTHON_CMD=python3 ..
714 ln -s $(which python3) /usr/bin/python
723 ## Arch - Source
728 pacman -S cmake clang llvm flex bison python
738 cmake .. -DPYTHON_CMD=python3 # for python3 support
739 make -j$(nproc)
742 make -j$(nproc)
752 git clone https://github.com/llvm/llvm-project.git
753 mkdir -p llvm-project/llvm/build/install
754 cd llvm-project/llvm/build
755 cmake -G "Ninja" -DLLVM_TARGETS_TO_BUILD="BPF;X86" \
756 -DLLVM_ENABLE_PROJECTS="clang" \
757 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PWD/install ..