[OSM-dev] Need help with Mapnik error message: UserWarning: Could not create datasource. No plugin found for type 'postgis' in layer 'leisure'

Jon Burgess jburgess777 at googlemail.com
Sat Nov 22 13:13:25 GMT 2008


On Sat, 2008-11-22 at 13:38 +0100, Ralf Zimmermann wrote:
> I spent a whole day on setting up a virtual machine with Debian 4.0 r5 with 
> Mapnik and posgres-postgis. My goal is to render my own tiles for a project.
> 
> At the moment it looks like I have a working postgis install, populating the 
> database with osm2pgsql seems to work fine - it shows me Node, Way and Relation 
> stats at the end of that run. No error messages.
> 
> But when I run Mapnik, I am stuck right now. I googeled for a while but really 
> found nothing that gave me an idea of what is going wrong.
> 
> Here is the error message (I re-typed it from the screen - so there might be a 
> typo somewhere) from generate_tiles.py:
> ---------------------------
> mapnik at debian:~/mapnik$ ./generate_tiles.py
> render_tiles( (11.4, 48.07, 11.699999999999999, 48.219999999999999) 
> /home/mapnik/mapnik/osm.xml /home/mapnik/mapnik/tiles/ 1 12 Muenchen )
> 
> Traceback (most recent call last):
>    File "./generate_tiles.py", line 135, in ?
>      render_tiles(bbox, mapfile, tile_dir, 1, 12, "Muenchen")
>    File "./generate_tiles.py", line 53, in render_tiles
>      load_map(m,mapfile)
> UserWarning: Could not create datasource. No plugin found for type 'postgis' in 
> layer 'leisure'
> mapnik at debian:~/mapnik$
> ---------------------------
> 
> Does anyone have a quick idea what I am doing wrong here? I think I am almost 
> where I want to be - feels like it is only a little thing missing now.
> 
> Any hints would be welcome. My Linux skills are not that super.
> 
> RalfZ
> Munich, Germany
> 
> 
> I have run "strace ./generate_tiles.py 2>&1 | grep input" as I have seen it in 
> another post where somebody had a similar issue. My problem is that I have no 
> idea if this should tell me anything useful for my problem. Ich checked that the 
> files mentioned below do exist.
> 
> stat64("/usr/local/lib/mapnik/input", {st_mode=S_IFDIR|S_ISGID|0755, 
> st_size=4096, ...}) = 0
> stat64("/usr/local/lib/mapnik/input", {st_mode=S_IFDIR|S_ISGID|0755, 
> st_size=4096, ...}) = 0
> open("/usr/local/lib/mapnik/input", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 4
> stat64("/usr/local/lib/mapnik/input/shape.input", {st_mode=S_IFREG|0755, 
> st_size=203855, ...}) = 0
> open("/usr/local/lib/mapnik/input/shape.input", O_RDONLY) = 5
> stat64("/usr/local/lib/mapnik/input/raster.input", {st_mode=S_IFREG|0755, 
> st_size=68289, ...}) = 0
> open("/usr/local/lib/mapnik/input/raster.input", O_RDONLY) = 5


Check for the file: /usr/local/lib/mapnik/input/postgis.input
It is probably missing because the Mapnik compilation was unable to find
the relevant PostgreSQL libraries and headers files.

If you look at the initial scons output when you compiled Mapnik:

[jburgess at shark mapnik]$ scons
scons: Reading SConscript files ...
Building on Linux ...
pkg-config --exists cairomm-1.0
Checking for C library m... yes
Checking for C library ltdl... yes
Checking for C library png... yes
Checking for C library tiff... yes
Checking for C library z... yes
Checking for C library jpeg... yes
Checking for C library proj... yes
Checking for C library pq... yes
...

You need the "pq" line above to say 'yes'. You may need to install the
Postgresql development headers or point scons at the correct location
with PGSQL_INCLUDES=... or PGSQL_LIBS=...


	Jon



> _______________________________________________
> dev mailing list
> dev at openstreetmap.org
> http://lists.openstreetmap.org/listinfo/dev





More information about the dev mailing list