gpt4 book ai didi

c - 如何在 Ubuntu 12.04 上安装 libcap?

转载 作者:行者123 更新时间:2023-11-30 17:33:16 59 4
gpt4 key购买 nike

我正在尝试让 libcap 在我的机器上运行(运行 Ubuntu 12.04),但我目前无法完成此操作:

这一切是这样开始的:

  1. 在 Eclipse 中,我收到无法解析的警告 pcap.h 。它说Unresolved inclusion <pcap.h>
  2. 我像这样安装了 libcap:sudo apt-get install libcap-dev
  3. 我重新启动了机器。

现在我仍然收到无法解析的警告 pcap.h .

我做错了什么?有什么想法吗?

最佳答案

尝试安装 linux-headers,但您需要知道您的内核版本:

例如:

tiago@dell:~$ sudo uname -a
Linux dell 3.11.0-20-generic #35~precise1-Ubuntu SMP Fri May 2 21:32:55 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

tiago@dell:~$ sudo apt-get install linux-headers-3.11.0-20
Reading package lists... Done
Building dependency tree
Reading state information... Done
linux-headers-3.11.0-20 is already the newest version.
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.

关于c - 如何在 Ubuntu 12.04 上安装 libcap?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23805445/

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