CPAN installing Net::Pcap and Packet module failed due to lpcap

喜夏-厌秋 提交于 2019-11-29 18:00:21

The README file for Net::Pcap shows how to tell Makefile.PL where to find the pcap library:

perl Makefile.PL INC=-I/opt/local/include/pcap LIBS='-L/opt/local/lib -lpcap'

(I've inserted your paths into the example.)

However, getting the cpan shell to pass those arguments to Makefile.PL is rather more complicated. You'd have to use the Distroprefs system and create a YAML file to supply the arguments. If you're not already familiar with Distroprefs, it'll probably be easier to just install Net::Pcap by hand.

This fixed my issue:

yum -y install perl-Net-Pcap libpcap-devel

On Ubuntu, just install libnet-pcap-perl.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!