通过yum安装了libpcap-devel 然后软连接也做了 make的时候报错
[root@xiang hping-master]# make
gcc -o hping3 -O2 -Wall -g main.o getifname.o getlhs.o parseoptions.o datafiller.o datahandler.o gethostname.o binding.o getusec.o opensockraw.o logicmp.o waitpacket.o resolve.o sendip.o sendicmp.o sendudp.o sendtcp.o cksum.o statistics.o usage.o version.o antigetopt.o sockopt.o listen.o sendhcmp.o memstr.o rtt.o relid.o sendip_handler.o libpcap_stuff.o memlockall.o memunlockall.o memlock.o memunlock.o ip_opt_build.o display_ipopt.o sendrawip.o signal.o send.o strlcpy.o arsglue.o random.o scan.o hstring.o script.o interface.o adbuf.o hex.o apdutils.o sbignum.o sbignum-tables.o ars.o apd.o split.o rapd.o -L/usr/local/lib -lpcap -ltcl -lm -lpthread
/usr/bin/ld: cannot find -ltcl
collect2: ld 返回 1
make: *** [hping3] 错误 1
安装:
需要依赖安装
yum -y install gcc libpcap-devel tcl-devel
libpcap-devel安装不上的话去官网下载安装包手动安装
建立软链接:ln -sf /usr/include/pcap-bpf.h /usr/include/net/bpf.h
./configure make make install
为什么还会/usr/include/net/bpf.h不是目录这个问题?