lizrice / learning-ebpf

Learning eBPF, published by O'Reilly - out now! Here's where you'll find a VM config for the examples, and more

Home Page:https://www.amazon.com/Learning-eBPF-Programming-Observability-Networking/dp/1098135121

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Request for clearer installation instructions

LichUnHappy opened this issue · comments

Hello,

First of all, I'd like to thank you for creating and maintaining this valuable project. I am having some difficulties with the installation process, and it would be greatly appreciated if you could provide clearer instructions on how to install the project correctly.

I have tried following the current instructions, but I encountered the following issues:

  • The official installation on Ubuntu 22.04 is outdated.
  • How to install all the necessary libraries on embedded devices?

I believe that providing more detailed installation steps would not only help me but also benefit other users who may face similar issues in the future. It would be immensely helpful if you could consider adding a section to the README that addresses these concerns and provides updated installation instructions.

Thank you for your time and consideration.

In case it helps as it sounds like we may have had similar issues... This got me up and running:

  1. Download Ubuntu 22.04 Iso and create vm
  2. Run the all scripts from learning-ebfp.yaml e.g. these ones:

(everything after "script: |" and use sudo)

image

  1. Then follow the instructions on the home page read me of this repo exactly. E.g. copy and paste every line, even the cd .. lines....

This got me up and running after I was having trouble on my own Ubuntu 22.04.

Would be helpful to note that the ubuntu packaged bpftool is not compiled with JIT support. Download the latest bpftool from https://github.com/libbpf/bpftool/releases and you should be able to run the "sudo bpftool prog dump jited name hello" from Chap 3.

The official installation on Ubuntu 22.04 is outdated.

I'm not sure what you mean by this @LichUnHappy - the YAML file pulls an Ubuntu image from the 22.04 LTS release on cloud-images.ubuntu.com. Maybe you ran into the problem fixed by #28 because linux-tools (and then bpfcc-tools) weren't being installed properly?

Would be helpful to note that the ubuntu packaged bpftool is not compiled with JIT support.

@penghon this was covered by the section on Building bpftool in the README, but I've added a note that you can now download the binaries. Thanks for pointing that out - when the book was released, bpftool releases were only source code!

Yes. My issue has been solved. Thanks for your help.