7

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

psql:/home/user/share/postgresql/contrib/pgrouting-2.0/pgrouting.sql:2459: 
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

CREATE EXTENSION pgrouting

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

/home/user/lib

and

/home/user/bin

librouting_dd is at:

/home/user/lib/postgresql/librouting_dd.so

and cgal is at:

/home/user/lib/libCGAL.so.10

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
2
  • 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. 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
    Feb 18, 2015 at 16:40

2 Answers 2

3

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.

CREATE EXTENSION pgrouting 

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

1

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 that you have read and understand our privacy policy and code of conduct.

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