Monday, May 28, 2012

Re: Django GeoIP Module not found; can't remedy

...
> File
> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py",
> line 353, in __init__
> self._handle = _dlopen(self._name, mode)
> OSError: dlopen(/usr/local/lib/libGeoIP.dylib, 6): no suitable image
> found. Did find:
> /usr/local/lib/libGeoIP.dylib: mach-o, but wrong architecture"
>
I've been using macports and virtualenv so have not run into this
(pretty much everything gets built and installed in /usr/local,
including a new build of python itself).

But you are using Apple's python and a homebrew build of GeoIP and
python is clearly complaining that you do not have a compatible build of
the library.

Use the "file" command to examine the python installation and your
libGeoIP library (example from my system; yours has some different paths):

$ otool -L /usr/lib/python2.7
/System/Library/Frameworks/Python.framework/Versions/2.7/Python
(compatibility version 2.7.0, current version 2.7.1)
...
$ file /System/Library/Frameworks/Python.framework/Versions/2.7/Python
/System/Library/Frameworks/Python.framework/Versions/2.7/Python: Mach-O
universal binary with 2 architectures
/System/Library/Frameworks/Python.framework/Versions/2.7/Python (for
architecture x86_64): Mach-O 64-bit dynamically linked shared
library x86_64
/System/Library/Frameworks/Python.framework/Versions/2.7/Python (for
architecture i386): Mach-O dynamically linked shared library i386

I would include the geoip library in my example but it is having trouble
building from MacPorts. Am looking into that :/

hth

- Tom

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment