dnsperf是nominum提供的免费dns性能测试工具,ubuntu下面没有现成的包,需要自己下载自己编译
代码地址:
ftp://ftp.nominum.com/pub/nominum/dnsperf/2.0.0.0/dnsperf-src-2.0.0.0-1.tar.gz
编译的时候也不会那么顺利,有些库的依赖需要解决。简单记录问题和解决办法如下:
- download source code via ftp
- configure, normally, you would encounter an error like below
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