4

I am trying to install bcc module on my Linux machine so I can code BPF programs.

I've been following up with the page

https://github.com/iovisor/bcc/blob/master/INSTALL.md#kernel-configuration

to build a kernel and install bcc module.

However, whenever I type

sudo apt-get install bpfcc-tools linux-headers-$(uname -r)

I get an error :

E: Unable to locate package bpfcc-tools
E: Unable to locate package linux-headers-4.19.0
E: Couldn't find any package by glob 'linux-headers-4.19.0'
E: Couldn't find any package by regrex 'linux-headers-4.19.0'

I am sorry if I'm asking way too much basic thingy.. This is the only place that seems to have smart people with some answers.. Thank you so much in advance guys

peterh
  • 11,875
  • 18
  • 85
  • 108
Rosè
  • 345
  • 2
  • 13

1 Answers1

6

The bpfcc-tools package is only available starting with Ubuntu 18.04. For previous versions, you need to retrieve the package from the iovisor repository:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4052245BD4284CDD
echo "deb https://repo.iovisor.org/apt/$(lsb_release -cs) $(lsb_release -cs) main" | sudo 
tee /etc/apt/sources.list.d/iovisor.list
sudo apt-get update
sudo apt-get install bcc-tools libbcc-examples linux-headers-$(uname -r)

Source: https://github.com/iovisor/bcc/blob/master/INSTALL.md

pchaigno
  • 11,313
  • 2
  • 29
  • 54
  • Thank you so much for your help! I really appreciate it :D – Rosè Feb 27 '19 at 14:58
  • You're welcome! Please prefer accepting an answer rather than upvoting it if it answers your question. It makes it easier for everyone else to find it. – pchaigno Feb 27 '19 at 15:15
  • Oh sorry I'm not familiar with this website so I don't really know how it works..? I will try to see if I can accept your answer! It was no disrespect! So sorry! :D – Rosè Feb 28 '19 at 11:05
  • I didn't took it as disrespect, don't worry. I just thought I'd mention it since you're new to the website :) – pchaigno Feb 28 '19 at 13:56