gpt4 book ai didi

bpf - 密件抄送 : ImportError cannot import name BPF

转载 作者:行者123 更新时间:2023-12-05 04:58:21 27 4
gpt4 key购买 nike

尝试运行示例 hello_world.py 时出现以下错误。

Traceback (most recent call last):
File "/usr/share/bcc/examples/hello_world.py", line 9, in <module>
from bcc import BPF
ImportError: cannot import name BPF

我从源代码 ( link ) 安装了 bcc。我还安装了 python bcc 绑定(bind)包 python-bccpython3-bcc 但没有成功。

我正在运行 Ubuntu 18.04 和内核版本 4.15.0-117-generic

我在这里错过了什么?

最佳答案

在ubuntu 20.04中,我执行以下命令修复它。

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

关于bpf - 密件抄送 : ImportError cannot import name BPF,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64046700/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com