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