Skip to content

Installing the Mapnik C library

Tim Burgess edited this page Oct 31, 2016 · 2 revisions

Building and installing the Mapnik C library

Chickpea essentially interprets requested tile URLs and then passes the tile creation details to Mapnik via C. So in addition to Mapnik being installed, the Mapnik C library also needs to be built and installed. This is not provided as part of a standard Mapnik install.

The Mapnik C library has a dependency on the mapnik development library which in turn has dependencies on various other libraries. On Ubuntu/Debian, these can be installed with 'sudo apt-get install libmapnik-dev and this will pull in all dependencies.

The Mapnik C API is available at https://github.com/springmeyer/mapnik-c-api

To install:

git clone https://github.com/springmeyer/mapnik-c-api

Inside the new directory, simply run make. This will create a library file named libmapnik_c.so on Linux, libmapnik_c.dynlib on OS X.

Copy the library to the clib directory in your chickpea directory.

Error message

If chickpea can't find the library file, it prints ./clib/libmapnik_c.so: cannot open shared object file

Clone this wiki locally