Skip to content

Notes on Download, Installation and building pgRouting

Sunveer Singh edited this page Sep 23, 2018 · 21 revisions


More information can be found in:

pgRouting on Ubuntu can be installed using packages from a PostgreSQL repository:

Using a terminal window:

The distributions are called codename-pgdg. The codename can be obtained with:

$(lsb_release -cs)

Create /etc/apt/sources.list.d/pgdg.list.

sudo sh -c 'echo "deb $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
  • Import the repository key, update the package lists

sudo apt install wget ca-certificates
wget --quiet -O - | sudo apt-key add -
sudo apt update
  • Install pgrouting based on your postgres Installation: for this example is 9.3
sudo apt install postgresql-9.3-pgrouting

This will also install all required packages such as PostgreSQL and PostGIS if not installed yet.

  • To be up-to-date with changes and improvements
sudo apt-get update & sudo apt-get upgrade

Winnie Bot Builds:

Production Builds:

Experimental binaries are available via PostGIS windows build bot - Production builds are available via EDB Stackbuilder - PostGIS bundle and get installed when you install PostGIS.

  • Issues

For PostgreSQL 64-bit VC++ builds, there is an issue with trsp giving the wrong answer. This issue doesn't seem to exist with the 32-bit builds. Refer to for details

  • Building from source

To get the dependencies, you can use the following script:

RedHat Fedora Centos

Use the following link to see the pgRouting version available on Fedora:


pgRouting can be installed via ports:

cd /usr/ports/databases/pgRouting
make install clean

or package:

pkg install pgrouting



brew install pgrouting

The installation command in is pretty much all one needs to do on macOS if homebrew is installed. The requirements can be installed via brew as well and are configured here: Specific versions for pgrouting can't be chosen at the moment. The version defined in the formulas file will be installed. If specific versions are need to be, there is

Clone this wiki locally
You can’t perform that action at this time.