qq_我做你的小太阳_0
2015-09-24 18:05
[root@www hping-master]# ./configure
build byteorder.c...
create byteorder.h...
./configure:行81: -: 未找到命令
==> WARNING: no Tcl header files found!
--------------------------------------
system type: LINUX
LIBPCAP : PCAP=-lpcap
PCAP_INCLUDE :
MANPATH : /usr/local/man
USE_TCL :
TCL_VER :
TCL_INC :
LIBTCL : -ltcl -lm -lpthread
TCLSH :
(to modify try configure --help)
--------------------------------------
creating Makefile...
creating dependences...
now you can try `make'
yum install -y libpcap-devel
遇到一些错误:
libpcap_stuff.c:19:21: 错误:net/bpf.h:没有那个文件或目录
make: *** [libpcap_stuff.o] 错误 1
[root@slave hping-master]# ln -sf /usr/include/pcap-bpf.h /usr/include/net/bpf.h
遇到错误:
/usr/bin/ld: cannot find -ltcl
collect2: ld 返回 1
make: *** [hping3] 错误 1
解决办法:
yum -y install tcl tcl-devel
遇到错误
/usr/local/src/hping-master/main.c:190: undefined reference to `hping_script'
collect2: ld 返回 1
make: *** [hping3] 错误 1
直接退出 删除 hping-master , 重新unzip 解压 ,之后进入解压包,
./configure
make
如果出现这个界面:
make strip
make install
这样就可以解决了, 如有什么问题,欢迎追问.
安装环境准备:
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
以上来源于网络
Linux系统扫描技术及安全防范
30145 学习 · 75 问题
相似问题