Short Version

Extracting the tar ball

tar xvfz MobilityDB-1.0.tar.gz
cd MobilityDB-1.0

To compile assuming you have all the dependencies in your search path

mkdir build
cd build
cmake  ..
sudo make install

Once MobilityDB is installed, it needs to be enabled in each individual database you want to use it in.

createdb mobility
psql mobility -c 'CREATE EXTENSION PostGIS'
psql mobility -c 'CREATE EXTENSION MobilityDB'

Get the Sources

The MobilityDB latest release can be found in


To download this release:

wget -O mobilitydb-1.0.tar.gz

Go to the section called “Short Version” to the extract and compile instructions.


To download the repository

git clone
cd MobilityDB
git checkout v1.0

Go to the section called “Short Version” to the compile instructions (there is no tar ball).

Enabling the Database

MobilityDB is an extension that depends on PostGIS. Enabling PostGIS before enabling MobilityDB in the database can be done as follows


Alternatively, this can be done in a single command by using CASCADE, which installs the required PostGIS extension before installing the MobilityDB extension



Compilation Dependencies

To be able to compile MobilityDB, make sure that the following dependencies are met:

  • GNU C compiler (gcc). Some other ANSI C compilers can be used but may cause problems compiling some dependencies such as PostGIS.
  • GNU Make (gmake or make) version 3.1 or higher. For many systems, GNU make is the default version of make. Check the version by invoking make -v.
  • PostgreSQL version 10 or higher. PostgreSQL is available from Notice that for using SP-GiST indexes for MobilityDB you need at least PostgreSQL version 11.
  • PostGIS version 2.5. PostGIS is available from PostGIS version 3.0 or higher is currently not supported, this is planned for future releases of MobilityDB.
  • GNU Scientific Library (GSL). GSL is available from GSL is used for the random number generators.

Please notice that PostGIS has its own dependencies such as Proj4, GEOS, LibXML2, or JSON-C, and these libraries are also used in MobilityDB. For a full PostgreSQL/PostGIS support matrix and PostGIS/GEOS support matrix refer to

Optional Dependencies

For user's documentation

Example: Installing dependencies on Linux

Database dependencies

sudo apt-get install postgresql-12 postgresql-server-dev-12 postgresql-12-postgis

Build dependencies

sudo apt-get install cmake gcc libgsl-dev


MobilityDB uses the cmake system to do the configuration. The build directory is different from the source directory.

To create the build directory

mkdir build

To see the variables that can be configured

cd build
cmake -L ..

Build and Install

Please notice that the current version of MobilityDB has only been tested on Linux systems. It may work on other UNIX-like systems, but remain untested. Support for Windows is planned. We are looking for volunteers to help us to test MobilityDB on multiple platforms.

The following instructions start from path/to/MobilityDB on a Linux system

mkdir build
cd build
cmake ..
sudo make install

When the configuration changes

rm -rf build

and start the build process as mentioned above.


MobilityDB uses ctest, the CMake test driver program, for testing. This program will run the tests and report results.

To run all the tests


To run a given test file

ctest -R '21_tbox'

To run a set of given test files you can use wildcards

ctest -R '22_*'