-
Notifications
You must be signed in to change notification settings - Fork 0
UbuntuInstallation
For all versions of Ubuntu it is a good idea to be fully up to date before starting:
sudo apt-get update
sudo apt-get upgradeFor older versions, see the archived notes at UbuntuInstallationOld
If you are intending to install Tilemill as well as Mapnik, do not follow the directions below in order to avoid package conflicts. Instead, directly proceed to install Tilemill. Mapnik will automatically be installed with your Tilemill installation.
First, ensure add-apt-repository is installed:
sudo apt-get install -y python-software-propertiesMapnik v2.2.0
This is the latest in the 2.2.x series.
sudo add-apt-repository ppa:mapnik/v2.2.0
sudo apt-get update
sudo apt-get install libmapnik mapnik-utils python-mapnikThese packages come from: https://launchpad.net/~mapnik/+archive/v2.2.0/+packages
Mapnik v2.1.0
This is the latest in the 2.1.x series.
sudo add-apt-repository ppa:mapnik/v2.1.0
sudo apt-get update
sudo apt-get install libmapnik mapnik-utils python-mapnikThese packages come from: https://launchpad.net/~mapnik/+archive/v2.1.0/+packages
For nightly builds from master (3.0.0-pre)
This is the latest development code - built nightly - directly from https://github.com/mapnik/mapnik/commits/master
sudo add-apt-repository ppa:mapnik/nightly-trunk
sudo apt-get update
sudo apt-get install libmapnik mapnik-utils python-mapnikThese packages come from: https://launchpad.net/~mapnik/+archive/nightly-trunk/+packages
First, remove any other old mapnik packages:
sudo apt-get purge libmapnik* mapnik-utils python-mapnikMapnik master may require a boost version more recent than provided by your Ubuntu distribution.
Ubuntu 12.04 Precise ships with 2 different boost versions: 1.46 and 1.48. Make sure you install the correct version (see below) or use the latest Boost version (that works with Mapnik) by installing Boost from the mapnik/boost PPA:
sudo add-apt-repository ppa:mapnik/boost
sudo apt-get update
sudo apt-get install libboost-dev libboost-filesystem-dev libboost-program-options-dev libboost-python-dev libboost-regex-dev libboost-system-dev libboost-thread-dev Note: You can see the boost version offered by your distro with the below command. And if you are using the above PPA then its version should show up as a candidate for installation:
apt-cache policy libboost-dev # On Ubuntu 12.04 Precise, make sure you get the 1.48 boost packages:
sudo apt-get install \
libboost-filesystem1.48-dev \
libboost-program-options1.48-dev \
libboost-python1.48-dev libboost-regex1.48-dev \
libboost-system1.48-dev libboost-thread1.48-dev
# On newer system or if you've activated the mapnik PPA, then use this:
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 \
libltdl7 libltdl-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 clang \
libgdal1-dev python-gdal \
postgresql-9.1 postgresql-server-dev-9.1 postgresql-contrib-9.1 postgresql-9.1-postgis \
libsqlite3-dev# For the development branch:
git clone https://github.com/mapnik/mapnik
# Or instead download the latest version (currently 2.1.0):
wget https://github.com/downloads/mapnik/mapnik/mapnik-v2.1.0.tar.bz2
tar xfj mapnik-v2.1.0.tar.bz2
mv mapnik-v2.1.0 mapnik
# Then start compiling
cd mapnik
./configure && make && sudo make installTo test mapnik:
make test