Solved

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

Posted on 2009-04-03
7
1,112 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 

Author Comment

by:em37
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Email validation in proper way is  very important validation required in any web pages. This code is self explainable except that Regular Expression which I used for pattern matching. I originally published as a thread on my website : http://www…
I have been pestered over the years to produce and distribute regular data extracts, and often the request have explicitly requested the data be emailed as an Excel attachement; specifically Excel, as it appears: CSV files confuse (no Red or Green h…
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…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

743 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now