CPAN:无法安装 Net/Pcap.pm
CPAN : Can't install Net/Pcap.pm
关于 Linux Xubuntu 14.04.3(3.19.0-25 通用)。
cpan > install Net::Pcap
...
CPAN.pm : Building S/SA/SAPER/Net-Pcap-0.17.tar.gz
looking for -lpcap... no
You appear to lack the pcap(3) library
...
然后我试了这个
$ cd /home/user/.cpan/build/Net-Pcap-0.17-hash
$ perl Makefile.PL INC=-I/usr/include/pcap LIBS='-L/usr/lib/i386-linux-gnu/libpcap.so -lpcap'
looking for -lpcap... no
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
You appear to lack the pcap(3) library.
If it is installed in a non-standard location, 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.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
这里要完成的问题是库
# dpkg -L libpcap0.8-dev
...
/usr/include/pcap-bpf.h
/usr/include/pcap
/usr/include/pcap/usb.h
/usr/include/pcap/namedb.h
/usr/include/pcap/bpf.h
/usr/include/pcap/pcap.h
/usr/include/pcap/bluetooth.h
/usr/include/pcap/sll.h
/usr/include/pcap/ipnet.h
/usr/include/pcap/vlan.h
/usr/include/pcap.h
/usr/include/pcap-namedb.h
/usr/lib/i386-linux-gnu/libpcap.a
/usr/lib/i386-linux-gnu/libpcap.so
...
请注意,wireshark 在这个干净的 VM 中运行良好。
怎么了?软件包是否已弃用?
正如@Steffen Ullrich 所建议的,我用 libnet-pcap-perl 解决了我的问题。
关于 Linux Xubuntu 14.04.3(3.19.0-25 通用)。
cpan > install Net::Pcap
...
CPAN.pm : Building S/SA/SAPER/Net-Pcap-0.17.tar.gz
looking for -lpcap... no
You appear to lack the pcap(3) library
...
然后我试了这个
$ cd /home/user/.cpan/build/Net-Pcap-0.17-hash
$ perl Makefile.PL INC=-I/usr/include/pcap LIBS='-L/usr/lib/i386-linux-gnu/libpcap.so -lpcap'
looking for -lpcap... no
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
You appear to lack the pcap(3) library.
If it is installed in a non-standard location, 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.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
这里要完成的问题是库
# dpkg -L libpcap0.8-dev
...
/usr/include/pcap-bpf.h
/usr/include/pcap
/usr/include/pcap/usb.h
/usr/include/pcap/namedb.h
/usr/include/pcap/bpf.h
/usr/include/pcap/pcap.h
/usr/include/pcap/bluetooth.h
/usr/include/pcap/sll.h
/usr/include/pcap/ipnet.h
/usr/include/pcap/vlan.h
/usr/include/pcap.h
/usr/include/pcap-namedb.h
/usr/lib/i386-linux-gnu/libpcap.a
/usr/lib/i386-linux-gnu/libpcap.so
...
请注意,wireshark 在这个干净的 VM 中运行良好。
怎么了?软件包是否已弃用?
正如@Steffen Ullrich 所建议的,我用 libnet-pcap-perl 解决了我的问题。