0

I'm trying to install pcapsipdump but I get the error below when I try to make. libpcab and libpcap-devel are installed, which I did via "yum install libpcap libpcap-devel". I'm currently stuck on how to debug this further so I'm reaching out. Thanks

[root@master-server pcapsipdump-code]# make
make-checks/libpcap.cpp: In function ‘int main()’:
make-checks/libpcap.cpp:2: error: ‘pcap_set_snaplen’ was not declared in this scope

g++ make-checks/libpcap.cpp -lpcap -o make-checks/libpcap

===
Required library not found: pcap
Please install it in your distribution-specific manner, e.g.:
yum install libpcap libpcap-devel
apt-get install tcpdump libpcap-dev
cd ~ports/net/libpcap && make install
===
make: *** [make-checks/libpcap] Error 1

Output from yum install libpcap libpcap-devel

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* addons: mirrors.vooservers.com
* base: mirrors.vooservers.com
* extras: mirrors.vooservers.com
* updates: centos.hyve.com
Setting up Install Process
Package 14:libpcap-0.9.4-15.el5.i386 already installed and latest version
Package 14:libpcap-devel-0.9.4-15.el5.i386 already installed and latest version
Nothing to do

make debug is very long but then end is below if this helps:

Considering target file `make-checks/all'.
File `make-checks/all' does not exist.
Considering target file `make-checks/cxx'.
Finished prerequisites of target file `make-checks/cxx'.
No need to remake target `make-checks/cxx'.
Considering target file `make-checks/libpcap'.
File `make-checks/libpcap' does not exist.
Finished prerequisites of target file `make-checks/libpcap'.
Must remake target `make-checks/libpcap'.
Putting child 0x09cec050 (make-checks/libpcap) PID 8162 on the chain.
Live child 0x09cec050 (make-checks/libpcap) PID 8162
make-checks/libpcap.cpp: In function ‘int main()’:
make-checks/libpcap.cpp:2: error: ‘pcap_set_snaplen’ was not declared in  this scope
jaseUK
  • 173
  • 8

2 Answers2

1

You'll need to either 1) get a version before SVN r43 or 2) get libpcap 1.0 or later installed.

The pcapsipdump developers decided that the -B flag was so important that, instead of having a configure script check whether the libpcap 1.0 pcap_create()/pcap_activate() APIs were available, and continue to use the old pcap_open_live() API if the new APIs weren't available, they switched to the new APIs and thus required libpcap 1.0 or later.

And then they failed to have the error message say something such as

Required library not found: pcap 1.0 or later

to make it clear that the problem isn't necessarily that pcap isn't installed, it could be that the installed version is too old.

If you download pcapsipdump 0.2 from its SourceForge project page, you'll get a version before SVN r43, so you won't see that particular problem if you try to build it.

To get a newer version of libpcap installed without upgrading to a newer version of the OS, you'll probably have to download libpcap source from the tcpdump.org Web site and build it, unless there's some alternative RPM site from which you can get it.

-1

Lokks like you're making from svn sources, right ? Downloading tar.gz from sourceforge solved the problem for me.

Bruno
  • 1
  • This does not add any useful information to the previous answer; if you feel the other answer is not clear you should try to improve it. – Law29 May 14 '16 at 12:57