BIND with GeoIP Error

I have been playing around with BIND DNS and the GeoIP/GeoDNS patch for a while now.
This error always seems to pop up on CentOS, and Google didn’t show that much.

checking for C compiler default output file name... a.out
checking whether the C compiler works... configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
checking for C compiler default output file name... a.out
checking whether the C compiler works... configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.See `config.log' for more details.

If you check further in config.log you will see the following line:

./a.out: error while loading shared libraries: libGeoIP.so.1: cannot open shared object file: No such file or directory

The fix for my system was open the following file:

nano /etc/ld.so.conf

Add the following line, which defines where to find “libGeoIP.so.1

/usr/local/geoip/lib/

Finally run this command to refresh:

ldconfig

Then you should be all set to go, using something like the following:

CFLAGS="-I/usr/local/geoip/include" LDFLAGS="-L/usr/local/geoip/lib -lGeoIP" ./configure --prefix=/usr/local/bind

Technology enthusiastic with many ongoing online projects one of which is this personal blog PingBin. While also working full time within a data center designing and maintaining the network infrastructure.

4 comments On BIND with GeoIP Error

Leave a reply:

Your email address will not be published.