Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1210
  • Last Modified:

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

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
em37
Asked:
em37
  • 4
  • 3
1 Solution
 
mrjoltcolaCommented:
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
 
em37Author Commented:
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
 
mrjoltcolaCommented:
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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
em37Author Commented:
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
 
mrjoltcolaCommented:
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
 
em37Author Commented:
I checked 3 or 4 times that C:\WpdPack exsists.

Tried the cmd line you posted still did not work.
0
 
mrjoltcolaCommented:
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now