Dhruv Pal
Dhruv Pal

Reputation: 959

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?

Upvotes: 2

Views: 1886

Answers (3)

user3486626
user3486626

Reputation: 176

I have the same problem using debian 12. This was what i have in renderd.conf

[mapnik]
plugins_dir=/usr/lib/mapnik/3.0/input
font_dir=/usr/share/fonts/truetype/dejavu
font_dir_recurse=false

I have to change plugins_dir to /usr/lib/mapnik/3.1/input

Upvotes: 0

flyingzhao
flyingzhao

Reputation: 106

You should check the directory /usr/local/lib/mapnik/input, and you will find the file postgis.input is missing.

The reason is that when you compile mapnik, the dependency for plugin 'postgis' can not be satisfied. You can run python scons/scons.py INPUT_PLUGINS='postgis' in the shell and you would be reminded some dependency problem. So you should add the postgresql and postgis to the system environment before make mapnik.

Make sure postgresql94-devel has been already installed or you can run sudo yum install postgresql94-devel.Then, you can do like this

export PATH=$PATH:/usr/pgsql-9.4/bin:/usr/pgsql-9.4/lib:/usr/local/lib

and then use the ./configure,make and make install command for mapnik. After reinstallation of mapnik, you should find postgis.input in the directory /usr/local/lib/mapnik/input and then try again.

Upvotes: 0

Trendfischer
Trendfischer

Reputation: 7647

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...

Upvotes: 1

Related Questions