2012-07-19 36 views
4

我嘗試在Windows安裝Net::Pcap,但它提供了以下錯誤信息:如何在Windows 7中安裝Net :: Pcap for Strawberry Perl?

c:\P P> cpan 
cpan> install Net::Pcap 

socket.h patched... ok 
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 

Checking if your kit is complete... 

Looks good 

Note (probably harmless): No library found for -lwpcap

我該如何解決這個問題?我沒有安裝任何WinPcap開發包;但我確實安裝了Wireshark。

+2

因此,您需要WinPcap開發人員包。從http://www.winpcap.org/install/得到它「包」包含所需的庫。 – jm666 2012-07-19 17:10:55

回答

2

的CPAN安裝診斷說明你的問題很清楚

你似乎缺乏WinPcap的開發包

他們還告訴你從哪裏

下載他們或得到並安裝WinPcap開發者套裝
http://www.winpcap.org/devel.htm

+0

-I使用上面的鏈接重新安裝,但它給出了相同的錯誤。 – 2012-07-19 17:59:32

+0

鏈接更改爲 - http://www.winpcap.org/devel.htm – 2012-07-19 19:34:44