How to install Mapnik Toolkit

  
in Ubuntu

In Ubuntu system operation, because of the need to develop Gis application, to install Mapnik toolkit in Ubuntu system, how to install Mapnik toolkit? The following small series will introduce you to the Ubuntu installation Mapnik toolkit steps, interested friends can come to understand.

Uninstall old:

sudo apt-get purge libmapnik * mapnik-utils python-mapnik

Setting:

sudo apt-get Install /

libboost-filesystem-dev /

libboost-program-options-dev /

libboost-python-dev libboost-regex-dev /

libboost-system-dev libboost-thread-dev /

# get a build environment going. .

sudo apt-get install /

libicu-dev /

python-dev libxml2 libxml2-dev /

libfreetype6 libfreetype6-dev /

libjpeg-dev /

libpng-dev /

libproj-dev /

libtiff-dev /

libcairo2 libcairo2-dev python-cairo Python-cairo-dev /

libcairomm-1.0-1 libcairomm-1.0-dev /

ttf-unifont ttf-dejavu ttf-dejavu-core ttf-dejavu-extra /

git build-essential python-nose /

libgdal1-dev python-gdal /

postgresql-9.3 postgresql-server-dev-9.3 postgresql-contrib-9.3 postgresql-9.3-postgis- 2.1 /

libsqlite3-dev

The above needs to be noted: since ubuntu 14.04 is used, the postgresql related version becomes 9.3

.

Configuring, compiling links, installing:

# For the development branch:

git clone https://github.com/mapnik/mapnik mapnik-2.3.x - b 2.3.x

cd mapnik-2.3.x

. /configure && make && sudo make install

The process of make is a long time, about 40 minutes. . . .

I encountered a ternal compiler error :killed (program cc1plus) error

After checking the Internet, some people said that the memory is not enough, my memory configuration was 512M, changed to 2g.

Run make again, the result is wrong:

vitrual memory exhausted cannot allocate memory

Seeing this error, there is still some feeling, memory is not enough to add. But I didn't add it, but run make again, and make all the way. The remaining make install is fine.

Enter the command to see if it is installed successfully:

mapnik-config -v

I output my version number: 2.3.0-pre

The above is the introduction of the Ubuntu installation of the Mapnik toolkit. At the time of installation, the old one will be uninstalled. After installation, you can use the mapnik-config -v command to check whether the installation is successful.

Copyright © Windows knowledge All Rights Reserved