Solved

How do I install net::pcap on a windows server?

Posted on 2009-04-03
7
1,130 Views
Last Modified: 2012-06-27
I'm trying to install the Perl module net::pcap on Windows Server 2003 without internet access with a Active State Perl and winpcap installed and WpdPack located in the root of the C drive. I get the following message when I use nmake to install the module. I realize I need a C compiler and have MSVC C++ express installed. Any help would be appreciated. Thx

C:\temp\Net-Pcap-0.16>perl Makefile.PL INC=-IC:WpdPack\Include "LclsIBS=-LC:\WpdPack\Lib -lwpcap"
Unable to patch socket.h
looking for -lwpcap... yes
checking for pcap_lib_version() in -lwpcap... no
        - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
You appear to lack the WinPcap developer pack.

If it is installed in a non-standard location, please try setting the LIBS
and INC values on the command line.  For instance, if you have unziped the
developer's pack in C:\WpdPack, you should execute:

    perl Makefile.PL INC=-IC:/WpdPack/Include "LIBS=-LC:/WpdPack/Lib -lwpcap"

Or get and install the WinPcap developer's pack from
  http://www.winpcap.org/install/
        - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
detecting available functions... ok
WARNING: LclsIBS is not a known parameter.
'LCLSIBS' is not a known MakeMaker parameter name.
'LclsIBS' is not a known MakeMaker parameter name.
Note (probably harmless): No library found for -lwpcap
Note (probably harmless): No library found for oldnames.lib
Note (probably harmless): No library found for kernel32.lib
Note (probably harmless): No library found for user32.lib
Note (probably harmless): No library found for gdi32.lib
Note (probably harmless): No library found for winspool.lib
Note (probably harmless): No library found for comdlg32.lib
Note (probably harmless): No library found for advapi32.lib
Note (probably harmless): No library found for shell32.lib
Note (probably harmless): No library found for ole32.lib
Note (probably harmless): No library found for oleaut32.lib
Note (probably harmless): No library found for netapi32.lib
Note (probably harmless): No library found for uuid.lib
Note (probably harmless): No library found for ws2_32.lib
Note (probably harmless): No library found for mpr.lib
Note (probably harmless): No library found for winmm.lib
Note (probably harmless): No library found for version.lib
Note (probably harmless): No library found for odbc32.lib
Note (probably harmless): No library found for odbccp32.lib
Note (probably harmless): No library found for msvcrt.lib
Writing Makefile for Net::Pcap

C:\temp\Net-Pcap-0.16>nmake

Microsoft (R) Program Maintenance Utility   Version 1.50
Copyright (c) Microsoft Corp 1988-94. All rights reserved.

        cl -c  -IC:WpdPack\Include  -nologo -GF -W3 -MD -Zi -DNDEBUG -O1 -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DUSE_SI
TECUSTOMIZE -DPRIVLIB_LAST_IN_INC -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_READFIX -MD -Zi -DNDEBUG
-O1    -DVERSION=\"0.16\"  -DXS_VERSION=\"0.16\"  "-IC:\Perl\lib\CORE"  -DWINSOCK2_H_REQUESTED -DWPCAP -DHAVE_REMOTE -DHAVE_BLANK
Pcap.c
'cl' is not recognized as an internal or external command,
operable program or batch file.
NMAKE : fatal error U1077: 'C:\WINDOWS\system32\cmd.exe' : return code '0x1'
Stop.

C:\temp\Net-Pcap-0.16>
0
Comment
Question by:em37
  • 4
  • 3
7 Comments
 
LVL 40

Accepted Solution

by:
mrjoltcola earned 500 total points
ID: 24062060
1) Did you generate the Makefile as it suggests, since it could not find  your winpcap?

perl Makefile.PL INC=-IC:/WpdPack/Include "LIBS=-LC:/WpdPack/Lib -lwpcap"

But change the path to your winpcap directory

2) Did you run vcvars32.bat  from the Microsoft Visual C++ bin directory? I do not use express, but I assume it is the same as all others. "cl" is the command line C/C++ compiler, and it appears you don't have it in your path. There is a bat file in  your Visual Studio VC\bin directory called vcvars32.bat, it sets up your environment for building C++ apps. Run it in the command window prior to runnin the Makefile.pl
0
 

Author Closing Comment

by:em37
ID: 31566333
Thanks, that was part of it.

It still cannot find the winpcap dev libs and I'm specifying the dir when I run the command:

perl Makefile.PL INC=-IC:WpdPack\Include "LclsIBS=-LC:\WpdPack\Lib -lwpcap"
0
 
LVL 40

Expert Comment

by:mrjoltcola
ID: 24063371
You did not have to close the question if it is not resolved. So what happens?

Is your install under C:\WpdPack ?

Try slashes in the file paths?

perl Makefile.PL INC=-IC:WpdPack\Include "LclsIBS=-LC:\\WpdPack\\Lib -lwpcap"
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 

Author Comment

by:em37
ID: 24063394
Thanks, did not mean to close the question.

I get the same output when I use double back slashes:

C:\temp\Net-Pcap-0.16>perl Makefile.PL INC=-IC:WpdPack\\Include "LclsIBS=-LC:\\WpdPack\\Lib -lwpcap
Unable to patch socket.h
looking for -lwpcap... yes
checking for pcap_lib_version() in -lwpcap... no
        - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
You appear to lack the WinPcap developer pack.

If it is installed in a non-standard location, please try setting the LIBS
and INC values on the command line.  For instance, if you have unziped the
developer's pack in C:\WpdPack, you should execute:

    perl Makefile.PL INC=-IC:/WpdPack/Include "LIBS=-LC:/WpdPack/Lib -lwpcap"

Or get and install the WinPcap developer's pack from
  http://www.winpcap.org/install/
        - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
detecting available functions... ok
WARNING: LclsIBS is not a known parameter.
'LCLSIBS' is not a known MakeMaker parameter name.
'LclsIBS' is not a known MakeMaker parameter name.
Note (probably harmless): No library found for -lwpcap
Note (probably harmless): No library found for oldnames.lib
Note (probably harmless): No library found for kernel32.lib
Note (probably harmless): No library found for user32.lib
Note (probably harmless): No library found for gdi32.lib
Note (probably harmless): No library found for winspool.lib
Note (probably harmless): No library found for comdlg32.lib
Note (probably harmless): No library found for advapi32.lib
Note (probably harmless): No library found for shell32.lib
Note (probably harmless): No library found for ole32.lib
Note (probably harmless): No library found for oleaut32.lib
Note (probably harmless): No library found for netapi32.lib
Note (probably harmless): No library found for uuid.lib
Note (probably harmless): No library found for ws2_32.lib
Note (probably harmless): No library found for mpr.lib
Note (probably harmless): No library found for winmm.lib
Note (probably harmless): No library found for version.lib
Note (probably harmless): No library found for odbc32.lib
Note (probably harmless): No library found for odbccp32.lib
Note (probably harmless): No library found for msvcrt.lib
Writing Makefile for Net::Pcap
0
 
LVL 40

Expert Comment

by:mrjoltcola
ID: 24063441
I just notice what appears to be a typo. "cls" is in the LIBS string, and C:WpdPack is missing a \

perl Makefile.PL INC=-IC:WpdPack\Include "LclsIBS=-LC:\WpdPack\Lib -lwpcap"

Change to:

perl Makefile.PL INC=-IC:\WpdPack\Include "LIBS=-LC:\WpdPack\Lib -lwpcap"


Secondly, can you confirm that C:\Wpdpack exists?
0
 

Author Comment

by:em37
ID: 24063539
I checked 3 or 4 times that C:\WpdPack exsists.

Tried the cmd line you posted still did not work.
0
 
LVL 40

Expert Comment

by:mrjoltcola
ID: 24063599
1) Please post the log of the "perl Makefile.PL" again, since removing the "cls" string.
2) Also, try running nmake again?

I would like to see both logs or all in one.

0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
perl to convert excel to csv 3 252
unable to remove invisible characters with perl 2 89
Add additional column to .csv using Perl. 8 151
Log File Creation with Header and Footer 17 124
I've just discovered very important differences between Windows an Unix formats in Perl,at least 5.xx.. MOST IMPORTANT: Use Unix file format while saving Your script. otherwise it will have ^M s or smth likely weird in the EOL, Then DO NOT use m…
In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question