(OSM) Net::Pcap Error

Post Reply
gmariani405
Junior Member
Posts: 7
Joined: 05 Nov 2014, 14:47

(OSM) Net::Pcap Error

Post by gmariani405 »

I have OSM installed on a few servers and I'm running into some weird errors I can resolve. The original error was:
*ERROR* Net::Pcap failed to install, see /etc/osm/osmpcap.log. Packet inspection feature has been disabled in osm.
To which i installed pcap on the servers that were affected via

Code: Select all

sudo yum install perl-Net-Pcap
yum install libpcap libpcap-devel -y
I later saw this post ( viewtopic.php?t=11168 ) where it suggested to run

Code: Select all

sh /etc/osm/osmpcap.sh
and then review the logs at

Code: Select all

cat /etc/osm/osmpcap.log
to verify it installed correctly. Looking at the log, this is what it shows me:

Code: Select all

looking for -lpcap... yes
checking for pcap_lib_version() in -lpcap... yes
detecting available functions... ok
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for Net::Pcap
Writing MYMETA.yml and MYMETA.json
cp Pcap.pm blib/lib/Net/Pcap.pm
Running Mkbootstrap for Pcap ()
chmod 644 "Pcap.bs"
"/usr/local/cpanel/3rdparty/perl/530/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Pcap.bs blib/arch/auto/Net/Pcap/Pcap.bs 644
"/usr/local/cpanel/3rdparty/perl/530/bin/perl" "/usr/local/cpanel/3rdparty/perl/530/lib/perl5/5.30.0/ExtUtils/xsubpp"  -typemap '/usr/local/cpanel/3rdparty/perl/530/lib/perl5/5.30.0/ExtUtils/typemap' -typemap '/etc/osm/Modules/sources/Net-Pcap-0.18/typemap'  Pcap.xs > Pcap.xsc
mv Pcap.xsc Pcap.c
/usr/bin/gcc -c   -DPERL_DISABLE_PMC -fPIC -DPIC -m64 -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -Wall -Wwrite-strings -Os   -DVERSION=\"0.18\" -DXS_VERSION=\"0.18\" -fPIC "-I/usr/local/cpanel/3rdparty/perl/530/lib/perl5/5.30.0/x86_64-linux-64int/CORE"  -DHAVE_BLANK -DHAVE_PCAP_LIB_VERSION -DHAVE_PCAP_BREAKLOOP -DHAVE_PCAP_COMPILE_NOPCAP -DHAVE_PCAP_DATALINK_NAME_TO_VAL -DHAVE_PCAP_DATALINK_VAL_TO_DESCRIPTION -DHAVE_PCAP_DATALINK_VAL_TO_NAME -DHAVE_PCAP_DUMP_FILE -DHAVE_PCAP_DUMP_FLUSH -DHAVE_PCAP_FINDALLDEVS -DHAVE_PCAP_GETNONBLOCK -DHAVE_PCAP_GET_SELECTABLE_FD -DHAVE_PCAP_LIB_VERSION -DHAVE_PCAP_NEXT_EX -DHAVE_PCAP_OFFLINE_FILTER -DHAVE_PCAP_OPEN_DEAD -DHAVE_PCAP_SENDPACKET -DHAVE_PCAP_SETNONBLOCK -DHAVE_PCAP_SET_DATALINK Pcap.c
In file included from Pcap.xs:43:0:
stubs.inc:187:2: warning: #warning "the function pcap_list_datalinks() is not available" [-Wcpp]
 #warning "the function pcap_list_datalinks() is not available"
  ^
stubs.inc:322:2: warning: #warning "the function pcap_createsrcstr() is not available" [-Wcpp]
 #warning "the function pcap_createsrcstr() is not available"
  ^
stubs.inc:337:2: warning: #warning "the function pcap_parsesrcstr() is not available" [-Wcpp]
 #warning "the function pcap_parsesrcstr() is not available"
  ^
stubs.inc:352:2: warning: #warning "the function pcap_open() is not available" [-Wcpp]
 #warning "the function pcap_open() is not available"
  ^
stubs.inc:373:2: warning: #warning "the function pcap_setbuff() is not available" [-Wcpp]
 #warning "the function pcap_setbuff() is not available"
  ^
stubs.inc:388:2: warning: #warning "the function pcap_setuserbuffer() is not available" [-Wcpp]
 #warning "the function pcap_setuserbuffer() is not available"
  ^
stubs.inc:403:2: warning: #warning "the function pcap_setmode() is not available" [-Wcpp]
 #warning "the function pcap_setmode() is not available"
  ^
stubs.inc:418:2: warning: #warning "the function pcap_setmintocopy() is not available" [-Wcpp]
 #warning "the function pcap_setmintocopy() is not available"
  ^
stubs.inc:433:2: warning: #warning "the function pcap_sendqueue_alloc() is not available" [-Wcpp]
 #warning "the function pcap_sendqueue_alloc() is not available"
  ^
stubs.inc:455:2: warning: #warning "the function pcap_sendqueue_destroy() is not available" [-Wcpp]
 #warning "the function pcap_sendqueue_destroy() is not available"
  ^
stubs.inc:469:2: warning: #warning "the function pcap_sendqueue_queue() is not available" [-Wcpp]
 #warning "the function pcap_sendqueue_queue() is not available"
  ^
stubs.inc:484:2: warning: #warning "the function pcap_sendqueue_transmit() is not available" [-Wcpp]
 #warning "the function pcap_sendqueue_transmit() is not available"
  ^
stubs.inc:499:2: warning: #warning "the function pcap_event() is not available" [-Wcpp]
 #warning "the function pcap_event() is not available"
  ^
stubs.inc:514:2: warning: #warning "the function pcap_setsampling() is not available" [-Wcpp]
 #warning "the function pcap_setsampling() is not available"
  ^
Pcap.c: In function 'XS_Net__Pcap_strerror':
Pcap.c:1703:9: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
  RETVAL = pcap_strerror(error);
         ^
Pcap.xs: In function 'XS_Net__Pcap_getevent':
Pcap.xs:1038:13: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
         h = (unsigned int) pcap_getevent(p);  
             ^
rm -f blib/arch/auto/Net/Pcap/Pcap.so
LD_RUN_PATH="/lib/../lib64" /usr/bin/gcc  -shared -Os -L/usr/local/lib -fstack-protector-strong  Pcap.o  -o blib/arch/auto/Net/Pcap/Pcap.so  \
   -lpcap   \
 
chmod 755 blib/arch/auto/Net/Pcap/Pcap.so
cp bin/pcapinfo blib/script/pcapinfo
"/usr/local/cpanel/3rdparty/perl/530/bin/perl" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/pcapinfo
'blib/lib/Net/Pcap.pm' -> '/etc/osm/Modules/Net/Pcap.pm'
'blib/arch/auto/Net/Pcap/Pcap.so' -> '/etc/osm/Modules/auto/Net/Pcap/Pcap.so'
removed 'Net-Pcap-0.18/bin/pcapinfo'
removed directory: 'Net-Pcap-0.18/bin'
removed 'Net-Pcap-0.18/Changes'
removed 'Net-Pcap-0.18/eg/pcapdump'
removed 'Net-Pcap-0.18/eg/pktdump.pl'
removed directory: 'Net-Pcap-0.18/eg'
removed 'Net-Pcap-0.18/fallback/const-c.inc'
removed 'Net-Pcap-0.18/fallback/const-xs.inc'
removed directory: 'Net-Pcap-0.18/fallback'
removed 'Net-Pcap-0.18/Makefile.PL'
removed 'Net-Pcap-0.18/MANIFEST'
removed 'Net-Pcap-0.18/META.json'
removed 'Net-Pcap-0.18/META.yml'
removed 'Net-Pcap-0.18/Pcap.pm'
removed 'Net-Pcap-0.18/Pcap.xs'
removed 'Net-Pcap-0.18/ppport.h'
removed 'Net-Pcap-0.18/README'
removed 'Net-Pcap-0.18/stubs.inc'
removed 'Net-Pcap-0.18/t/00-load.t'
removed 'Net-Pcap-0.18/t/01-api.t'
removed 'Net-Pcap-0.18/t/02-lookup.t'
removed 'Net-Pcap-0.18/t/03-openlive.t'
removed 'Net-Pcap-0.18/t/04-loop.t'
removed 'Net-Pcap-0.18/t/05-dump.t'
removed 'Net-Pcap-0.18/t/06-offline.t'
removed 'Net-Pcap-0.18/t/07-stats.t'
removed 'Net-Pcap-0.18/t/08-filter.t'
removed 'Net-Pcap-0.18/t/09-error.t'
removed 'Net-Pcap-0.18/t/10-fileno.t'
removed 'Net-Pcap-0.18/t/11-snapshot.t'
removed 'Net-Pcap-0.18/t/12-next.t'
removed 'Net-Pcap-0.18/t/13-dispatch.t'
removed 'Net-Pcap-0.18/t/14-datalink.t'
removed 'Net-Pcap-0.18/t/15-is_swapped.t'
removed 'Net-Pcap-0.18/t/16-setnonblock.t'
removed 'Net-Pcap-0.18/t/17-lib_version.t'
removed 'Net-Pcap-0.18/t/18-open_dead.t'
removed 'Net-Pcap-0.18/t/19-breakloop.t'
removed 'Net-Pcap-0.18/t/20-constants.t'
removed 'Net-Pcap-0.18/t/21-next_ex.t'
removed 'Net-Pcap-0.18/t/22-open.t'
removed 'Net-Pcap-0.18/t/23-srcstr.t'
removed 'Net-Pcap-0.18/t/50-anyevent-pcap.t'
removed 'Net-Pcap-0.18/t/50-net-pcap-easy.t'
removed 'Net-Pcap-0.18/t/50-poe-component-pcap.t'
removed 'Net-Pcap-0.18/t/distchk.t'
removed 'Net-Pcap-0.18/t/pod.t'
removed 'Net-Pcap-0.18/t/podcover.t'
removed 'Net-Pcap-0.18/t/podspell.t'
removed 'Net-Pcap-0.18/t/portfs.t'
removed 'Net-Pcap-0.18/t/README'
removed 'Net-Pcap-0.18/t/samples/ping-ietf-20pk-be.dmp'
removed 'Net-Pcap-0.18/t/samples/ping-ietf-20pk-le.dmp'
removed directory: 'Net-Pcap-0.18/t/samples'
removed 'Net-Pcap-0.18/t/Utils.pm'
removed directory: 'Net-Pcap-0.18/t'
removed 'Net-Pcap-0.18/typemap'
removed 'Net-Pcap-0.18/funcs.txt'
removed 'Net-Pcap-0.18/Makefile'
removed 'Net-Pcap-0.18/MYMETA.json'
removed 'Net-Pcap-0.18/MYMETA.yml'
removed 'Net-Pcap-0.18/const-c.inc'
removed 'Net-Pcap-0.18/const-xs.inc'
removed 'Net-Pcap-0.18/macros.all'
removed 'Net-Pcap-0.18/blib/lib/Net/.exists'
removed 'Net-Pcap-0.18/blib/lib/Net/Pcap.pm'
removed directory: 'Net-Pcap-0.18/blib/lib/Net'
removed 'Net-Pcap-0.18/blib/lib/auto/Net/Pcap/.exists'
removed directory: 'Net-Pcap-0.18/blib/lib/auto/Net/Pcap'
removed directory: 'Net-Pcap-0.18/blib/lib/auto/Net'
removed directory: 'Net-Pcap-0.18/blib/lib/auto'
removed directory: 'Net-Pcap-0.18/blib/lib'
removed 'Net-Pcap-0.18/blib/arch/.exists'
removed 'Net-Pcap-0.18/blib/arch/auto/Net/Pcap/.exists'
removed 'Net-Pcap-0.18/blib/arch/auto/Net/Pcap/Pcap.so'
removed directory: 'Net-Pcap-0.18/blib/arch/auto/Net/Pcap'
removed directory: 'Net-Pcap-0.18/blib/arch/auto/Net'
removed directory: 'Net-Pcap-0.18/blib/arch/auto'
removed directory: 'Net-Pcap-0.18/blib/arch'
removed 'Net-Pcap-0.18/blib/bin/.exists'
removed directory: 'Net-Pcap-0.18/blib/bin'
removed 'Net-Pcap-0.18/blib/script/.exists'
removed 'Net-Pcap-0.18/blib/script/pcapinfo'
removed directory: 'Net-Pcap-0.18/blib/script'
removed 'Net-Pcap-0.18/blib/man1/.exists'
removed directory: 'Net-Pcap-0.18/blib/man1'
removed 'Net-Pcap-0.18/blib/man3/.exists'
removed directory: 'Net-Pcap-0.18/blib/man3'
removed directory: 'Net-Pcap-0.18/blib'
removed 'Net-Pcap-0.18/pm_to_blib'
removed 'Net-Pcap-0.18/Pcap.bs'
removed 'Net-Pcap-0.18/Pcap.c'
removed 'Net-Pcap-0.18/Pcap.o'
removed directory: 'Net-Pcap-0.18'
So it says that -lpcap is found and the right version yet I'm getting tons of function not found errors. Any idea what is going on? I seem to be able to enable SMTP packet inspection in the configuration without error, just wasn't sure if this was normal.

Post Reply