WebFaction
Community site: login faq
0
1

I tried downloading the C API and installing it just like the instructions say, except adding " --prefix=$HOME" to the ./configure command.

After that, the make install command failed with these errors:

libtool: install: error: cannot install `libGeoIPUpdate.la' to a directory not ending in /usr/local/lib
make[2]: *** [install-libLTLIBRARIES] Error 1
make[2]: Leaving directory `/home/dor/GeoIP-1.4.6/libGeoIP'
make[1]: *** [install-am] Error 2
make[1]: Leaving directory `/home/dor/GeoIP-1.4.6/libGeoIP'
make: *** [install-recursive] Error 1

What should I do? How did you install GeoIP in your account?

This question is marked "community wiki".

asked 27 Oct '10, 13:20

Dor
6112
accept rate: 0%

Never mind it. This post helped me: http://forum.webfaction.com/viewtopic.php?id=1091 Only needed to change 2.5 to 2.6.

(27 Oct '10, 13:36) Dor

Glad you worked it out! I'm going to post the answer here just to avoid having to jump to the forum for future reference:

First, install the C API:

mkdir -p ~/src ~/bin ~/lib/python2.7
cd ~/src
wget http://geolite.maxmind.com/download/geoip/api/c/GeoIP.tar.gz
tar zxf GeoIP.tar.gz 
cd GeoIP-1.4.8/
./configure --prefix=$HOME
make
make install

Then install the Python binding:

CPPFLAGS="-I$HOME/include" LDFLAGS="-L$HOME/lib" easy_install-2.7 http://www.maxmind.com/download/geoip/api/python/GeoIP-Python-latest.tar.gz

Since the libraries are in your $HOME/lib directory, you need to set LD_LIBRARY_PATH whenever you invoke Python to use the library, eg:

LD_LIBRARY_PATH=$HOME/lib python2.7
permanent link

answered 27 Oct '10, 14:35

seanf
12.2k41836
accept rate: 37%

edited 18 Jun '13, 17:35

For anyone trying to install with Apache and/or Django, after following these instructions, you can edit $HOME/webapps/<app>/apache/bin/start and change LD_LIBRARY_PATH=/home/<username>/webapps/<app>/apache2/lib to LD_LIBRARY_PATH=/home/<username>/lib:/home/<username>/webapps/<app>/apache2/lib. Now you can import GeoIP from python in the apache process. To use Django's wrapper, in settings.py create GEOIP_LIBRARY_PATH = "/home/<username>/lib/libGeoIP.so" and now you can from django.contrib.gis.geoip import GeoIP.

(27 Jun '12, 12:07) Carl G

Guys,

Thanks for the great instructions.

Message to others: If you are doing this, you also need seanf's bit at the end about LD_LIBRARY_PATH and GEOIP_LIBRARY_PATH.

Ta.

permanent link

answered 24 Nov '12, 15:37

JHickson
11
accept rate: 0%

edited 24 Nov '12, 15:48

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×337
×75
×44
×10
×4

question asked: 27 Oct '10, 13:20

question was seen: 10,113 times

last updated: 18 Jun '13, 17:35

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM