Содержание
anyone know how to fix the problem regarding header file in ubuntu 10.10. I am executing a sniffing program which makes use of this header file. My system shows libcap package is installed. Still, on compiling the code, an error is coming which reads:
fatal error: pcap.h: No such file or directory compilation terminated.
Please help me out.
4 Answers 4
The system won’t let me correct Eric Fossum’s comment, because I lack reputation. There is a typo ("libcap" vs. "libpcap") and his suggested command should read the following:
You don’t have the pcap.h file in your include path. You need to add the location of pcap.h to your include path when compiling:
If you’re using linuxbrew, you can just brew install libpcap . In my case I was trying to install nethogs and it failed with this error.
Not the answer you’re looking for? Browse other questions tagged ubuntu-10.10 or ask your own question.
Linked
Related
Hot Network Questions
To subscribe to this RSS feed, copy and paste this URL into your RSS reader.
site design / logo © 2020 Stack Exchange Inc; user contributions licensed under cc by-sa 4.0 with attribution required. rev 2020.1.16.35797
При компиляции программ из исходного кода вы можете столкнуться с ошибкой:
Соответственно, компиляция обрывается из-за ошибки.
Данный файл содержится в пакете libpcap-dev. И для решения этой проблемы нужно установить этот пакет.
В производных Debian достаточно выполнить команду:
В Arch Linux и его производных заголовки (а причиной ошибки является отсутствие файла заголовка) совмещены с библиотеками. Поэтому если эта ошибка у вас на Арче, то там нужно установить пакет libpcap.
Если у вас возникнут аналогичные проблемы с отсутствием других файлов, то обратитесь к статье «Как в Linux узнать, в каком пакете содержится файл».
I’m running the latest version of Kali on a VirtualBox, and I cannot get hcxtools installed. More specifically, I can not figure out how to get the dependency pcap.h . Running make in /hcxtools responds:
The answers in issues 51 and 61 have not solved my problem.
– Mark Deven Jan 14 ’19 at 14:02
1 Answer 1
You need to install libpcap0.8-dev , which provides /usr/include/pcap.h .
In future, you can find this out by installing apt-file and using that:
(The first time you install it, you’ll need to run sudo apt update .)