Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Install mapnik 3.+ on Ubuntu 14.04 Trusty
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install git
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt-get update && sudo apt-get install gcc-4.9 g++-4.9
rm /usr/bin/g++ && sudo ln -s /usr/bin/g++-4.9 /usr/bin/g++
wget http://www.freedesktop.org/software/harfbuzz/release/harfbuzz-0.9.34.tar.bz2
tar xf harfbuzz-0.9.34.tar.bz2
cd harfbuzz-0.9.34
./configure && make && sudo make install
sudo ldconfig
cd ../
CLANG_VERSION=3.6
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test;
sudo add-apt-repository "deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty-${CLANG_VERSION} main";
wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key|sudo apt-key add -
sudo apt-get update -y
sudo apt-get install -y clang-3.6;
export CXX="clang++-3.6" && export CC="clang-3.6";
sudo apt-get install \
libboost-filesystem-dev \
libboost-program-options-dev \
libboost-python-dev libboost-regex-dev \
libboost-system-dev libboost-thread-dev
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 \
libsqlite3-dev
wget -O boost_1_61_0.tar.gz http://sourceforge.net/projects/boost/files/boost/1.61.0/boost_1_61_0.tar.gz/download
tar xzvf boost_1_61_0.tar.gz
cd boost_1_61_0/
sudo ln -s /usr/bin/clang-3.6 /usr/bin/clang
./bootstrap.sh --with-icu --with-python=python --libdir=/usr/local/lib --includedir=/usr/local/include
./b2
sudo ./b2 install
cd ..
git clone https://github.com/mapnik/mapnik --depth 10
cd mapnik
git submodule update --init deps/mapbox/variant
./configure CXX=${CXX} CC=${CC}
make
sudo make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment