Update Mapnik Version on OSM server.
Mapnik is an open source toolkit for rendering maps. To update mapnik version you first of all need to check current mapnik version installed on your system. For that use command
mapnik-config -v
If the program ‘mapnik-config’ is currently not installed. You can install it by typing:
sudo apt-get install libmapnik2-dev
In my case, I have to update from mapnik 2.3.0 to the latest version. So to update issue following commands.
# you might have to update your outdated clang
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt-get update -y
sudo apt-get install -y gcc-6 g++-6 clang-3.8
export CXX="clang++-3.8" && export CC="clang-3.8"
# install mapnik
git clone https://github.com/mapnik/mapnik mapnik-3.x --depth 10
cd mapnik-3.x
git submodule update --init
sudo apt-get install python zlib1g-dev clang make pkg-config curl
source bootstrap.sh
./configure CUSTOM_CXXFLAGS="-D_GLIBCXX_USE_CXX11_ABI=0" CXX=${CXX} CC=${CC}
make
make test
sudo make install
Make sure that you get no error while issuing make command.
After that, you have to update the path of plugin directory (the one where you clone mapnik-3.x ) of mapnik in renderd.conf file which is located at /usr/local/etc/.
What mistake I did was giving the incomplete path to the plugin directory. You have to give complete path up to input directory of mapnik.
You can verify your updated version by giving mapnik-config -v command as mentioned above.
Also, you should get “ rendering is using mapnik ”latest version” .” after issuing
renderd -f -c /usr/local/etc/renderd.conf
In the next blog, I will discuss about the errors I received while compiling mod_tile with make command and their respective solution.