[i=s] 本帖最后由 昊昊荡荡 于 2010-11-22 08:56 编辑 [/i]
在其官方网站下载hping源码安装,过程如下:
[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
[root@centos5 hping3-20051105]#
怎么回事呢?看了它提供的INSTALL文件,没发现答案。
nyz183 于 2010-11-29 09:48:51发表:
源码有问题的
昊昊荡荡 于 2010-11-22 08:57:04发表:
google到一篇博文,内容如下:在RHEL5中安装hping3的方法:
最近有同事需要用hping3这个工具,苦于不会安装,在google,baidu上面也很少有相关的介绍,所以我特写文档一份,和需要的朋友一起分享。
安装环境准备:
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
我的问题主要出在上面红色代码的那一行
贴出来,希望遇到同样问题的兄弟能有个参考。
昊昊荡荡 于 2010-11-22 08:42:57发表:
[root@centos5 ~]# rpm -qa |grep tcl
tcl-8.4.13-4.el5
tcl-devel-8.4.13-4.el5
我的系统安装了tcl包和tcl--devel包
怎么安装这个tcl的头文件呢