【发布时间】:2011-11-21 08:13:54
【问题描述】:
最近,我尝试通过 cpan 安装 perl 模块 Net::Packet 和 Net::Pcap,但它抱怨找不到 pcap 库。所以我在搜索 cpan 在安装模块时是否会接受外部 lib/include 目录,但直到现在还没有运气。
looking for -lpcap... no
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
You appear to lack the pcap(3) library.
If it is installed in a non-standard locatio n, please try setting the LIBS
and INC values on the command line.
Or get the sources and install the pcap library from http://www.tcpdump.org/
If you install the pcap library using a system package, make sure to also
install the corresponding -devel package, which contains the C headers needed
to compile this module.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
我的 pcap 库位于 /opt/local/lib,头文件位于 /opt/local/include/pcap。 有谁知道如何解决这个问题?谢谢
【问题讨论】:
-
您是否尝试在命令行上设置 LIBS 和 INC 值?
-
是不是类似于“cpan module LIBS=path INC=path”?