Howto install GeoIP C API in GNU/Linux

MaxMind’s GeoIP C api is used by various programs to map IP address to locations .

Here is the procedure to install this :

Download the latest source from http://www.maxmind.com/download/geoip/api/c/

mkdir /usr/local/geoip

./configure –prefix=/usr/local/geoip –exec-prefix=/usr/local/geoip

make

make install

Now we have to make the system loader load the shared libraries

Add the following to /etc/ld.so.conf.d/geoip.conf

====

cat /etc/ld.so.conf.d/geoip.conf
/usr/local/geoip/lib
====

ldconfig

If all goes well , you should have GeoIP installed in /usr/local/geoip

Share and Enjoy:
  • Digg
  • Mixx
  • del.icio.us
  • StumbleUpon
  • Facebook
  • TwitThis
  • Technorati
  • Google

Tags:

4 Responses to “Howto install GeoIP C API in GNU/Linux”

  1. Michael Says:

    I get the following error when trying to configure:

    $ sudo ./configure –prefix=/usr/local/geoip –exec-prefix=/usr/local/geoip
    configure: error: invalid variable name: –prefix

    I’m running Ubuntu 8.04 Server Edition, and this is the latest MaxMind API, GeoIP-1.4.5 .

  2. Anoop Alias Says:

    Its a double hyphen.. The error clearly states that the (double hyphen ) prefix is taken as a variable and not as an option
    Happy Computing
    Anoop

  3. Michael Says:

    Thanks Anoop, it works now. Problem was, I was copying from Firefox and pasting into the terminal window…for some reason Firefox is not processing the double hyphen as two hyphens but rather as an em dash - thus the terminal was interpreting it as a single hyphen.

  4. ads Says:

    That’s because the original post contains the error: single hyphen (-) and not double (–).

    Your firefox is working just fine. It’s typo on this post.

Leave a Reply