Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I'm fighting with an error I can't figure out where it is coming from. Tried to compile all the things and used the latest unstable/stable ppa repositories as well, can't find the issue where it is comeing from.

Servers Setup is:

  • Postgres 9.1
  • Postgis 2.0 (2.1)
  • Mapnik 2.0
  • TileCache latest

    An error occurred: Could not create datasource. No plugin found for type ' postgis ' (searched in: /usr/local/lib/mapnik/input) (encountered during parsing of layer 'landuse_gen0' in map '/var/mapnik/osm.xml') File "/usr/local/lib/python2.7/dist-packages/TileCache-2.11-py2.7.egg/TileCache/Service.py", line 343, in cgiHandler format, image = service.dispatchRequest( params, path_info, req_method, host ) File "/usr/local/lib/python2.7/dist-packages/TileCache-2.11-py2.7.egg/TileCache/Service.py", line 208, in dispatchRequest return self.renderTile(tile, params.has_key('FORCE')) File "/usr/local/lib/python2.7/dist-packages/TileCache-2.11-py2.7.egg/TileCache/Service.py", line 138, in renderTile data = layer.render(tile, force=force) File "/usr/local/lib/python2.7/dist-packages/TileCache-2.11-py2.7.egg/TileCache/Layer.py", line 436, in render image = self.renderMetaTile(metatile, tile) File "/usr/local/lib/python2.7/dist-packages/TileCache-2.11-py2.7.egg/TileCache/Layer.py", line 396, in renderMetaTile data = self.renderTile(metatile) File "/usr/local/lib/python2.7/dist-packages/TileCache-2.11-py2.7.egg/TileCache/Layers/Mapnik.py", line 39, in renderTile mapnik.load_map(m,self.mapfile)

share|improve this question
    
The postgis plugin is alive and well in /opt/local/lib/mapnik/input github.com/mapnik/mapnik/issues/1171 –  Mapperz Aug 13 '12 at 17:20
    
I have already the 2.0.x version and the patch is in the branch. That's strange... –  Styp Aug 14 '12 at 14:28
add comment

1 Answer 1

up vote 1 down vote accepted

It sounds like you first tried a source install of Mapnik. At this time input plugins were properly installed into the default directory at /usr/local/lib/mapnik/input. But the postgis plugin was not built because you did not have the pg_config program available and/or the postgres-devel package. If you followed http://github.com/mapnik/mapnik/wiki/UbuntuInstallation correctly this would not happen.

So, they way to fix this would be to do: sudo apt-get install postgresql-9.1 postgresql-server-dev-9.1 postgresql-contrib-9.1 postgresql-9.1-postgis and then re-configure and re-install Mapnik like:

cd 
./configure && sudo make install

But above you also said you tried the latest unstable/stable ppa repositories as well.... First of all: do not mix a source install with ppa installs. If you want to switch to using the PPA packages then go uninstall the Mapnik you source compiled like:

cd 
sudo make uninstall
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.