how to build dnsperf

2 篇文章 0 订阅

dnsperf是nominum提供的免费dns性能测试工具,ubuntu下面没有现成的包,需要自己下载自己编译

代码地址:

 ftp://ftp.nominum.com/pub/nominum/dnsperf/2.0.0.0/dnsperf-src-2.0.0.0-1.tar.gz

编译的时候也不会那么顺利,有些库的依赖需要解决。简单记录问题和解决办法如下:

  1. download source code via ftp
  2. configure, normally, you would encounter an error like below
configure: error: BIND 9 libraries must be installed
solution: apt-get install libbind-dev

3. make,  below error is always being met.
dns.c:46: fatal error: isc/hmacsha.h: No such file or directory
The solution is to download bind9 source code and extract isc/hmacsha.h and put it under /usr/include/isc/

4. make it again

gcc -pthread dnsperf.o libperf.a -lnsl -L/usr/lib -lbind9 -ldns -lgssapi_krb5 -lcrypto -lisccfg -lisc -ldl -lcap -lpthread -L/usr/lib/x86_64-linux-gnu -lxml2 -lm -o dnsperf
/usr/bin/ld: cannot find -lgssapi_krb5
/usr/bin/ld: cannot find -lcap

it does not make effect that add "-L" before -lgssapi

The solution is to install libcap2-dev and libkrb5-dev

gcc -pthread dnsperf.o libperf.a -lnsl -L/usr/lib -lbind9 -ldns -L/usr/lib -lgssapi_krb5 -lcrypto -lisccfg -lisc -lcap -lpthread -lxml2 -lm -o dnsperf
/usr/bin/ld: cannot find -lcrypto
collect2: ld returned 1 exit status
make: *** [dnsperf] Error 1

installing libcrypto++ or libcrypto++-dev doest not work. Need to install libssl-dev

gcc -pthread dnsperf.o libperf.a -lnsl -L/usr/lib -lbind9 -ldns -L/usr/lib -lgssapi_krb5 -lcrypto -lisccfg -lisc -lcap -lpthread -lxml2 -lm -o dnsperf
/usr/bin/ld: cannot find -lxml2
collect2: ld returned 1 exit status
make: *** [dnsperf] Error 1

solution:apt-get install libxml2-dev


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值