Skip to content
Karen Shea edited this page Dec 12, 2016 · 27 revisions

Note: the most common installation issue is a mismatch in Lua version Luabind was compiled against and Lua version OSRM picks up. Check Luabind's dependencies either in with apt or check ldd /usr/lib/libluabind.so and note the Lua version in the output. You need to install this Lua version for OSRM. For Ubuntu Trusty and later this should be Lua52.

Ubuntu 16.04

sudo apt install build-essential git cmake pkg-config \
libbz2-dev libstxxl-dev libstxxl1v5 libxml2-dev \
libzip-dev libboost-all-dev lua5.2 liblua5.2-dev libluabind-dev libtbb-dev

Ubuntu 15.10

sudo apt-get install build-essential git cmake pkg-config \
libbz2-dev libstxxl-dev libstxxl1v5 libxml2-dev \
libzip-dev libboost-all-dev lua5.2 liblua5.2-dev libluabind-dev libtbb-dev

Ubuntu 15.04

sudo apt-get install build-essential git cmake pkg-config \
libbz2-dev libstxxl-dev libstxxl1 libxml2-dev \
libzip-dev libboost-all-dev lua5.2 liblua5.2-0-dev libluabind-dev libtbb-dev

Ubuntu 14.04

You have to update your compiler gcc 4.8 which ships per default is too old for C++14:

sudo apt-get install software-properties-common
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install g++-6 gcc-6 build-essential git wget cmake pkg-config libbz2-dev libstxxl-dev libstxxl1 libxml2-dev libzip-dev libboost-all-dev lua5.2 liblua5.2-dev libluabind-dev libtbb-dev

and either export the new compiler per session

export CPP=cpp-6 CC=gcc-6 CXX=g++-6

or set it globally

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 20
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-6 20
sudo update-alternatives --install /usr/bin/cpp cpp /usr/bin/cpp-6 20

Earlier Ubuntu versions

You're pretty much on your own here: you need to update CMake, your compiler and have to compile every C++ dependency locally against your new compiler yourself. It's possible for sure; if you really need to do this and need help open a ticket or ping us on IRC.