openstreetmaptilemillmapnik

Tilemill error Could not create datasource for type: 'postgis' (searched for datasource plugins in '/usr/lib/mapnik/input')


Followed link OSM Quick start

Had some problems but I managed to perform all the steps. But when I opened newly created project in tilemill it shows under error

Could not create datasource for type: 'postgis' (searched for datasource plugins in '/usr/lib/mapnik/input') encountered during parsing of layer 'landuse_gen0' in Layer at line 197

Can somebody tell me what is this error and how to resolve it? I have followed all steps in provide link above?


Solution

  • The "OSM Bright Quick Start" page is a bit outdated. A few differences to handle installing postgres/postgis for Linux Mint 17.1/Ubuntu 14.04 to handle in Step 0 + 1:

    sudo apt-get install postgresql-9.3-postgis-2.1
    sudo apt-get install mapnik-input-plugin-postgis
    # Set every method to "trust"
    sudo vim /etc/postgresql/9.3/main/pg_hba.conf
    sudo /etc/init.d/postgresql restart
    psql -U postgres -c "create database osm;"
    psql -U postgres -d osm -f /usr/share/postgresql/9.3/contrib/postgis-2.1/postgis.sql
    psql -U postgres -d osm -f /usr/share/postgresql/9.3/contrib/postgis-2.1/spatial_ref_sys.sql
    

    This worked for me. Then follow with Step 2...