Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^3: Need help compiling Net::Pcap on Ubuntu 8.04

by alexm (Chaplain)
on Jul 22, 2008 at 00:12 UTC ( [id://699192]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Need help compiling Net::Pcap on Ubuntu 8.04
in thread Need help compiling Net::Pcap on Ubuntu 8.04

Those warnings above are not errors; they just warn you that some functionality may not be added. If you run make test after make and all tests are successful, then everything should be fine. You can see that the Makefile targets were actually made:

... chmod 755 blib/arch/auto/Net/Pcap/Pcap.so cp Pcap.bs blib/arch/auto/Net/Pcap/Pcap.bs chmod 644 blib/arch/auto/Net/Pcap/Pcap.bs cp bin/pcapinfo blib/script/pcapinfo /usr/bin/perl "-MExtUtils::MY" -e "MY->fixin(shift)" blib/script/pcapi +nfo Manifying blib/man1/pcapinfo.1p Manifying blib/man3/Net::Pcap.3pm

BTW, there's no need to sudo make unless you need to install the Makefile targets, i.e. sudo make install.

Replies are listed 'Best First'.
Re^4: Need help compiling Net::Pcap on Ubuntu 8.04
by bpa (Novice) on Jul 22, 2008 at 02:10 UTC
    Thank you so much for all your help. I have gotten the Net::Packet module working. I just ignored the error from the "make test" step for Net::Pcap because upon further scrutiny, I noticed that it was looking for something that wasn't there:

    t/03-openlive.......NOK 13# at t/03-openlive.t line 70. + # 'SIOCGIFHWADDR: No such device' # doesn't match '/^(?:bind|ioctl): (?:No such device)/'

    The regular expression seems to be looking only for bind or ioctl instead of the SIOCGIFHWADDR at the begining of the string. I went ahead with the "sudo make install" step and then ran my test packet sniffing script and it worked fine.
Re^4: Need help compiling Net::Pcap on Ubuntu 8.04
by bpa (Novice) on Jul 22, 2008 at 00:37 UTC
    alexm,

    Thanks again. I had wondered about whether the warnings were really critical or not, so thanks for that. I usually never sudo until the install step, and most of the time it is fine, except in this case I got the error:

    touch: cannot touch `Pcap.bs': Permission denied


    when running make, so that is why I used sudo. After that I just got somewhat paranoid that maybe not being root was causing some of my problems, and I just decided to sudo with everything figuring it couldn't hurt.

    I took you suggestion to go ahead and run "make test" and I get the following:

    PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_h +arness(0, 'blib/lib', 'blib/arch')" t/*.t t/00-load...........# Testing Net::Pcap 0.14 under Perl 5.008008 t/00-load...........ok + t/01-api............ok + t/02-lookup.........ok + t/03-openlive.......ok 1/14 + # Failed test ' - $err must be set: SIOCGIFHWADDR: No such device' # at t/03-openlive.t line 70. t/03-openlive.......NOK 13# 'SIOCGIFHWADDR: No such +device' # doesn't match '/^(?:bind|ioctl): (?:No such device)/' # Looks like you failed 1 test of 14. t/03-openlive.......dubious + Test returned status 1 (wstat 256, 0x100) DIED. FAILED test 13 Failed 1/14 tests, 92.86% okay t/04-loop...........ok 1/195


    It just hangs there. It looks like maybe it can't find my network device?

      It seems an error in Net-Pcap-0.14 since I tried Net-Pcap-0.16 and that error is gone. While performing tests as root (needed for several of them), I even got unexpected successful results with 0.16:

      All tests successful (9 subtests UNEXPECTEDLY SUCCEEDED), 9 tests and +93 subtests skipped. Files=30, Tests=1609, 315 wallclock secs ( 1.07 cusr + 0.15 csys = 1 +.22 CPU)

      Please, note that some tests take quite time to finish, hence the 315 wallclock secs.

      you only need to install from synaptic libnet-pcap-perl This package contains Net::Pcap module. Buckaroo. Argentina

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://699192]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (2)
As of 2024-04-26 02:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found