NetStumbler.org Forums

Go Back   NetStumbler.org Forums > Software > Windows
Register Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old 01-09-2005   #1 (permalink)
Heinrich
 
Posts: n/a
Question Perl Problems, pcap.pm

When I try to run one of my perl applications I get this message:

Can't locate Net/Pcap.pm in @INC <@INC contains: c:/Perl/lib c:/Perl/site/lib .> at C:\Documents and Settings\Admin\Desktop\progs\pcap-getIV.pl line 27

Does someone know how to fix this?
  Reply With Quote
Old 01-09-2005   #2 (permalink)
nashr
Uber Geek
 
nashr's Avatar
 
Join Date: Aug 2002
Location: Virginia
Posts: 1,624
Quote:
Originally Posted by Heinrich
When I try to run one of my perl applications I get this message:

Can't locate Net/Pcap.pm in @INC <@INC contains: c:/Perl/lib c:/Perl/site/lib .> at C:\Documents and Settings\Admin\Desktop\progs\pcap-getIV.pl line 27

Does someone know how to fix this?
First, what Perl do you have installed.

Second, have you installed the PCAP module? Check the code for any "use" statements. Make sure any module addressed in a "use" statement has been installed on your system.

I recommend ActivePerl, and use their Perl Package Manager (ppm) to handle all package installations.

Good luck!
__________________
Help! I've been Simpsonized!
nashr is offline   Reply With Quote
Old 01-09-2005   #3 (permalink)
Thorn
Did you do the math?
 
Thorn's Avatar
 
Join Date: Apr 2002
Location: Villa Straylight
Posts: 10,358
Quote:
Originally Posted by Heinrich
When I try to run one of my perl applications I get this message:

Can't locate Net/Pcap.pm in @INC <@INC contains: c:/Perl/lib c:/Perl/site/lib .> at C:\Documents and Settings\Admin\Desktop\progs\pcap-getIV.pl line 27
It means that on line 27 of pcap-getIV.pl, there is a call to the PERL Module pcap.pm.

Quote:
Originally Posted by Heinrich
Does someone know how to fix this?
Either download and install the pcap.pm, or if you have done that, make sure the path is correct.
__________________
Thorn
"Read Altas Shrugged. Compare it to today. Repeat as necessary"
Thorn is offline   Reply With Quote
Old 01-09-2005   #4 (permalink)
Heinrich
 
Posts: n/a
I tried finding pcap.pm, but I can't find it anywhere. Does anyone know where to get it?

for PPM, is there a GUI version? I run all my perl stuff through cygwin and the ppm with active perl won't run.

The reason why I run cygwin is that when I run perl.exe I never get the C:/, it is just blank. Someone had that problem?

Thanks for all the help!
  Reply With Quote
Old 01-09-2005   #5 (permalink)
nashr
Uber Geek
 
nashr's Avatar
 
Join Date: Aug 2002
Location: Virginia
Posts: 1,624
Quote:
Originally Posted by Heinrich
I tried finding pcap.pm, but I can't find it anywhere. Does anyone know where to get it?

for PPM, is there a GUI version? I run all my perl stuff through cygwin and the ppm with active perl won't run.

The reason why I run cygwin is that when I run perl.exe I never get the C:/, it is just blank. Someone had that problem?

Thanks for all the help!
ActiveState's ppm for ActivePerl will not run with cygwin. If you're using cygwin, go to cpan to find the necessary module, download it and build it under cygwin/perl.
__________________
Help! I've been Simpsonized!
nashr is offline   Reply With Quote
Old 01-09-2005   #6 (permalink)
Thorn
Did you do the math?
 
Thorn's Avatar
 
Join Date: Apr 2002
Location: Villa Straylight
Posts: 10,358
Quote:
Originally Posted by Heinrich
The reason why I run cygwin is that when I run perl.exe I never get the C:/, it is just blank. Someone had that problem?
It isn't a problem, per se. The EXE just doesn't know what to do, as you haven't given it an argument.

Simply run PERL from the command line with an argument like it was intended:

C:\> \perl\bin\perl myscriptname.pl

or:

C:\perl\bin> perl myscriptname.pl
__________________
Thorn
"Read Altas Shrugged. Compare it to today. Repeat as necessary"
Thorn is offline   Reply With Quote
Old 01-09-2005   #7 (permalink)
nashr
Uber Geek
 
nashr's Avatar
 
Join Date: Aug 2002
Location: Virginia
Posts: 1,624
Quote:
Originally Posted by Thorn
It isn't a problem, per se. The EXE just doesn't know what to do, as you haven't given it an argument.

Simply run PERL from the command line with an argument like it was intended:

C:\> \perl\bin\perl myscriptname.pl

or:

C:\perl\bin> perl myscriptname.pl
I use ActivePerl as said previously. I've also used cygwin perl, but don't like it because you have to build/compile all the modules.

I put the perl\bin directory in my path, then I can run the files by just typing the scriptname.

c:\>script.pl

If you want ActivePerl to co-exist with cygwin Perl, I think it can be done. You can leave perl off your path, then have a couple .bat files to update your path for either version of Perl as desired.

I love ActivePerl because of the PPM. Further, they now have the pcap modules available directly. Check my perl sniffer pages for details.
__________________
Help! I've been Simpsonized!
nashr is offline   Reply With Quote
Old 01-09-2005   #8 (permalink)
Thorn
Did you do the math?
 
Thorn's Avatar
 
Join Date: Apr 2002
Location: Villa Straylight
Posts: 10,358
Quote:
Originally Posted by nashr
...
I put the perl\bin directory in my path, then I can run the files by just typing the scriptname.

c:\>script.pl

...
It can certainly be done that way and it is certainly more elegant, but I using the KISS principle. I just figured that if Heinrich was having difficulty understanding why it wouldn't run without the arguement, then getting into setting default paths might be pushing the issue.
__________________
Thorn
"Read Altas Shrugged. Compare it to today. Repeat as necessary"
Thorn is offline   Reply With Quote
Old 01-09-2005   #9 (permalink)
Heinrich
 
Posts: n/a
I have now found the pcap.pm and the program finds it. However, now it is asking for the module.

Picture

I downloaded pcap.pm from cpan, pcap.pm was the only file I got. How do I Build the module in cygwin?
  Reply With Quote
Old 01-09-2005   #10 (permalink)
nashr
Uber Geek
 
nashr's Avatar
 
Join Date: Aug 2002
Location: Virginia
Posts: 1,624
Quote:
Originally Posted by Heinrich
I have now found the pcap.pm and the program finds it. However, now it is asking for the module.

Picture

I downloaded pcap.pm from cpan, pcap.pm was the only file I got. How do I Build the module in cygwin?
Go back to cpan and find the readme. Then, RTFM. Another good site for perl support is PerlMonks

If you give me a link to the code I'll take a look at it, see if I can make it work for me.
__________________
Help! I've been Simpsonized!
nashr is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



Google
 
Web NetStumbler.org

All times are GMT -7. The time now is 12:18 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0 ©2007, Crawlability, Inc.


All messages express the views of the author and are for entertainment purposes only. Netstumbler.org cannot be held responsible for the authenticity of the content or the actions of its members. By using this site and its services, you warrant that you will not post any messages that are discriminating, obscene, hateful, threatening, or otherwise violates any laws and you release Netstumbler.org from any future claims of any kind whatsoever including, but not limited to, addiction and loss of productivity. All forum messages, private messages and any other content are properties of Netstumbler.org. Even if publicly available, personal or copyrighted information are not to be posted without the consent of the owner. Distribution of licensed and copyrighted materials in any way not endorsed by the copyright owner is strictly prohibited. You may not use this site and its resources to spam other sites or individuals or perform any action that violates any law. Items sold or bought in the For Sale forum are sold as is and no warranty or insurance of any kind is provided. Netstumbler.org cannot be held responsible for the outcome of any transactions and no warranty of any kind is provided, either express or implied. Vulgar words are not allowed in the subject lines ; they may be used in the message body in any forum. The Administrator, Super Moderators and Moderators of Netstumbler.org have the right to remove, edit, move or close any thread for any reason and to reveal your identity and other known information in the event of a complaint or legal action arising from any message posted by you.