我正在我的 Centos 5.9 机器上安装 metasploit。在执行捆绑安装时,我在安装 pcaprub 时遇到错误,我尝试将其作为gem install pcaprub单独运行并在此处记录。libpcap-devel-0.9.4-15.el5.i386.rpm 已安装。我潜伏了很多stackoverflow,遗憾的是这是我的第一篇文章。对于我发布的日志,我肯定会遗漏一些基石,所以请不要犹豫,阐明这一点。
gem install pcaprub
Building native extensions. This could take a while...
ERROR: Error installing pcaprub:
ERROR: Failed to build gem native extension.
/usr/local/bin/ruby extconf.rb
[*] Running checks for pcaprub code...
platform is i686-linux
checking for pcap_open_live() in -lpcap... yes
checking for pcap_setnonblock() in -lpcap... yes
creating Makefile
make
compiling pcaprub.c
pcaprub.c: In function 'Init_pcaprub':
pcaprub.c:954: error: 'PCAP_ERROR' undeclared (first use in this function)
pcaprub.c:954: error: (Each undeclared identifier is reported only once
pcaprub.c:954: error: for each function it appears in.)
pcaprub.c:955: error: 'PCAP_ERROR_BREAK' undeclared (first use in this function)
pcaprub.c:956: error: 'PCAP_ERROR_NOT_ACTIVATED' undeclared (first use in this function)
pcaprub.c:957: error: 'PCAP_ERROR_ACTIVATED' undeclared (first use in this function)
pcaprub.c:958: error: 'PCAP_ERROR_NO_SUCH_DEVICE' undeclared (first use in this function)
pcaprub.c:959: error: 'PCAP_ERROR_RFMON_NOTSUP' undeclared (first use in this function)
pcaprub.c:960: error: 'PCAP_ERROR_NOT_RFMON' undeclared (first use in this function)
pcaprub.c:961: error: 'PCAP_ERROR_PERM_DENIED' undeclared (first use in this function)
pcaprub.c:962: error: 'PCAP_ERROR_IFACE_NOT_UP' undeclared (first use in this function)
pcaprub.c:969: error: 'PCAP_WARNING' undeclared (first use in this function)
pcaprub.c:970: error: 'PCAP_WARNING_PROMISC_NOTSUP' undeclared (first use in this function)
make: *** [pcaprub.o] Error 1
Gem files will remain installed in /usr/local/lib/ruby/gems/1.9.1/gems/pcaprub-0.11.3 for inspection.
Results logged to /usr/local/lib/ruby/gems/1.9.1/gems/pcaprub-0.11.3/ext/pcaprub/gem_make.out