honeyd 用于压力测试安装说明

你。 提交于 2020-03-02 16:43:25

   honeyd的安装比较麻烦,我在ubuntu上下载之后许多库的版本都不兼容,网上可以查到错误相应的解决方法。这里有一个详细的版本。

   首先去官网下载安装包,http://www.honeyd.org/。

    tar zxvf honeyd-1.5c.tar.gz
  cd honeyd-1.5c
  ./configure
  出错了:configure: error: libpcap not found
  原因是没有安装libpcap包,现在开始安装。
  tar zxvf libpcap-1.1.1.tar.gz
  cd libpcap-1.1.1
  ./configure ;make;make install
  安装完libpcap后再回来安装honeyd。
  ./configure
  又出错了:
  checking for dnet-config... no
  configure: error: dnet-config not found
  缺少libdnet包。
  tar zxvf libdnet-1.11.tar.gz
  cd libdnet-1.11
  ./configure ;make;make install
  再回来安装honeyd。
  ./configure
  出错:
  checking for libevent... no
  configure: error: libevent not found
  缺少libevent包。
  tar zxvf libevent-1.4.14b-stable.tar.gz
  cd libevent-1.4.14b-stable
  ./configure ;make;make install
  再回来安装honeyd。
  ./configure
  出错了:configure: error: need either libedit or libreadline; install one of them
  解决办法:
  yum install -y readline readline-devel
  再回来安装honeyd。
  ./configure ;make;make install
  安装完honeyd后接下来安装arpd包。
  tar zxvf arpd-0.2.tar.gz
  cd arpd
  ./configure
  make
  make的时候出错了:
  arpd.c: In function 'arpd_send':
  arpd.c:268: error: expected ')' before string constant
  arpd.c: In function 'arpd_lookup':
  arpd.c:285: error: expected ')' before string constant
  arpd.c:294: error: expected ')' before string constant
  arpd.c:297: error: expected ')' before string constant
  arpd.c: In function 'arpd_recv_cb':
  arpd.c:426: error: expected ')' before string constant
  make: *** [arpd.o] Error 1
  解决方法:
  在arpd/arpd.c文件中添加 #define __FUNCTION__ ""
  然后在编译
  make;make install
  现在基本上就安装成功了。
  四.  还容易遇到的问题
  arpd包编译成功后,连接生成arpd二进制程序,在linux下运行时,出现如下错误:
  [root@linux lib]# arpd
  ./arpd/arpd: error while loading shared libraries: libevent-1.4.so.2: cannot open shared object file: No such file or directo
  解决方法:
  方法一:直接把libevent-1.4.so.2文件拷贝到系统指定的/usr/lib库文件目录中。或者做符合连接
  方法二:设置/etc/ld.so.conf文件,编辑该文件,在文件中加入libevent-1.4.so.2所在的目录,保存后退出。需要注意的是,每次改动ld.so.conf之后需要运行ldconfing来确认刷新。
  原因分析:
  arpd运行时,需要libevent库的支持,所以在运行arpd前,要先编译好libevent包,并把产生的libevent-1.4.so.2文件拷贝到系统默认的库文件目录下,以便arpd运行时能够连接到。
  出错:configure: error: libdnsres not found
  解决办法:
  wget http://www.monkey.org/~provos/libdnsres-0.1a.tar.gz
  tar zxvf libdnsres-0.1a.tar.gz
  cd libdnsres-0.1a
  ./configure ;make;make install
  错误:
  yacc -d ./parse.y
  make: yacc: Command not found
  make: *** [parse.c] Error 127
  解决办法:
  yum install -y byacc
  编译libpcap时出错:
  configure: error: Your operating system's lex is insufficient to compile
  libpcap.  flex is a lex replacement that has many advantages, including
  being able to compile libpcap.  For more information, see
  http://www.gnu.org/software/flex/flex.html .
  问题:
  缺少flex包
  解决办法:
  yum install -y flex
  出错:
  make all-recursive
  make[1]: Entering directory `/home/jlawre23/Desktop/honeyd-1.5c'
  Making all in .
  make[2]: Entering directory `/home/jlawre23/Desktop/honeyd-1.5c'
 gcc -DHAVE_CONFIG_H -I. -I. -I. -I./compat/libdnet -I./compat -I/usr/local/include -I/usr/include/pcap -I/usr/include -O2 -Wall -g -DPATH_HONEYDINCLUDE="\"/usr/local/include/honeyd\"" -DPATH_HONEYDDATA="\"/usr/local/share/honeyd\"" -DPATH_HONEYDLIB="\"/usr/local/lib/honeyd\"" -DHONEYD_PLUGINS_DECLARE="" -DHONEYD_PLUGINS="" -DPATH_RRDTOOL="\"\"" -c honeyd.c
  In file included from honeyd.c:97:
  tagging.h:89: error: expected declaration specifiers or ‘...’ before ‘(’ token
  tagging.h:89: error: expected declaration specifiers or ‘...’ before ‘(’ token
  In file included from stats.h:36,
  from honeyd.c:98:
  ./compat/sha1.h:23: warning: ‘__bounded__’ attribute directive ignored
  ./compat/sha1.h:23: warning: ‘__bounded__’ attribute directive ignored
  ./compat/sha1.h:26: warning: ‘__bounded__’ attribute directive ignored
  ./compat/sha1.h:28: warning: ‘__bounded__’ attribute directive ignored
  ./compat/sha1.h:30: warning: ‘__bounded__’ attribute directive ignored
  ./compat/sha1.h:32: warning: ‘__bounded__’ attribute directive ignored
  ./compat/sha1.h:35: warning: ‘__bounded__’ attribute directive ignored
  ./compat/sha1.h:35: warning: ‘__bounded__’ attribute directive ignored
  make[2]: *** [honeyd.o] Error 1
  make[2]: Leaving directory `/home/jlawre23/Desktop/honeyd-1.5c'
  make[1]: *** [all-recursive] Error 1
  make[1]: Leaving directory `/home/jlawre23/Desktop/honeyd-1.5c'
  make: *** [all] Error 2
  解决办法:
  卸掉其他版本的libevent包,安装本文提到的libevent-1.4.14b-stable。

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!