发布时间:2019-09-13 09:25:50编辑:auto阅读(1969)
安装环境准备:
gcc
libpcap-dev
tcl-dev
安装步骤:
#tar -zxvf hping3-200541105.tar.gz -C /usr/local/src
#cd /usr/include/net
#ln -s ../pcap-bpf.h bpf.h
#cd /usr/local/src/hping3-20051105
#./configure
#make
#make install
问题容易出在红色代码那部分,如果不执行那句代码,就会出现如下错误:
[root@centos5 hping3-20051105]# ./configure
build byteorder.c...
create byteorder.h...
===> Found Tclsh in: /usr/bin/tclsh8.4
==> WARNING: no Tcl header files found!
--------------------------------------
system type: LINUX
LIBPCAP : PCAP=-lpcap
PCAP_INCLUDE :
MANPATH : /usr/local/man
USE_TCL :
TCL_VER : 8.4
TCL_INC :
LIBTCL : -ltcl8.4 -lm -lpthread
TCLSH : /usr/bin/tclsh8.4
(to modify try configure --help)
--------------------------------------
creating Makefile...
creating dependences...
now you can try `make'
[root@centos5 hping3-20051105]# make
gcc -c -O2 -Wall -g main.c
main.c:29:18: 错误:pcap.h:没有那个文件或目录
main.c:169: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
main.c:170: 错误:‘PCAP_ERRBUF_SIZE’ 未声明 (不在函数内)
make: *** [main.o] 错误 1
上一篇: 【C语言】求1+2!+3!+...+20
下一篇: d3从入门到出门
48731
47767
38543
35738
30173
26913
25943
20785
20553
18941
332°
408°
442°
463°
448°
438°
492°
564°
679°
692°