?
Solved

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

Posted on 2009-04-03
7
Medium Priority
?
1,168 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 40

Accepted Solution

by:
mrjoltcola earned 2000 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

On Microsoft Windows, if  when you click or type the name of a .pl file, you get an error "is not recognized as an internal or external command, operable program or batch file", then this means you do not have the .pl file extension associated with …
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…
Six Sigma Control Plans

752 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