Im trying to install pgRouting and I cannot reach the end of the way because of the following error:

ERROR:  could not load library "/home/user/lib/postgresql/librouting_dd.so":
libCGAL.so.10: cannot open shared object file: No such file or directory

I get this error when I try to apply extensions in postgres database by executing


I installed the required dependencies and all installations were successful. Im installing the application in a CentOS server and binaries are installend in




librouting_dd is at:


and cgal is at:


To install the required dependencies and to install pgRouting I followed next steps:

::Installing Dependencies::

  1. Navigate to tmp folder before start installing

    • cd $HOME/tmp
    • export TEMPDIR=$HOME/tmp
  2. CMAKE

    • wget http://www.cmake.org/files/v3.1/cmake-3.1.2.tar.gz
    • tar xzf cmake-3.1.2.tar.gz
    • cd cmake-3.1.2
    • ./bootstrap
    • make --prefix=$HOME
    • make install
  3. BOOST

    • wget http://sourceforge.net/projects/boost/files/boost/1.57.0/boost.tar.gz
    • tar xzf boost.tar.gz
    • cd boost_1_57_0/
    • ./boostrap.sh
    • b2 install --prefix=$HOME
  4. MPFR

    • wget http://www.mpfr.org/mpfr-current/mpfr-3.1.2.tar.gz
    • tar xzf mpfr-3.1.2.tar.gz
    • cd mpfr-3.1.2/
    • ./configure
    • make
    • make check
    • make install
  5. CGAL

    • wget https://gforge.inria.fr/frs/download.php/file/34400/CGAL-4.5.1.tar.gz
    • tar xzf CGAL-4.5.1.tar.gz
    • cd CGAL-4.5.1/
    • cmake .
    • make
    • make install

::Installing PGRouting::

  1. Download package

    • git clone git://github.com/pgRouting/pgrouting.git
    • cd pgrouting
  2. Install package

    • mkdir build
    • cd build
    • cmake -DBoost_NO_BOOST_CMAKE=ON ..
    • make
    • make install
  • 1
    Two things could explain this: (1) the libCGAL.so.10 file not having read permissions, or (2) the /home/user/lib/ missing from the path. Commented Feb 17, 2015 at 7:45
  • 1) I reviewed the libCGAL.so.10 file permissions and it is a link to libCGAL.so.10.0.4 and both have full read and execution permissions. 2) I added the path /home/user/lib/ (export $PATH="$PATH:/home/user/lib/") and it makes no difference
    – Ernesto
    Commented Feb 18, 2015 at 16:40

2 Answers 2


The latest version postgresql i.e. 9.6 comes with a pre-installed pgRouting and Postgis extensions so you just need to do execute the following command to enable the extension in your current db.


Also if you could get the stack builder application on your system, It enables you to get the latest PostGIS Bundle from the Spatial Extentions that has already incorporated the pgRouting extension in it.

Currently, as shown below, I have SB 4.0.0 and PostGIS 2.3 installed that include pgRouting 2.4.1.

enter image description here


I had the same problem; it was solved by installing a previous version of pgrouting (version 2.0.1) as the most current version (2.1.0) was causing this problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.