发布时间:2019-09-13 09:25:50编辑:auto阅读(1737)
安装环境准备:
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从入门到出门
47848
46401
37286
34737
29319
25976
24920
19954
19549
18032
5795°
6419°
5934°
5964°
7070°
5918°
5949°
6442°
6405°
7782°