How to upgrade pgrouting to lastest version (2.6)

If you installed pgrouting from synaptic, probably you have pgrouting 2.4.2.
To upgrade to the last version, download it from github:

wget https://github.com/pgRouting/pgrouting/releases/download/v2.6.0/pgrouting-2.6.0.tar.gz
tar xzvf pgrouting-2.6.0.tar.gz
cd pgrouting-2.6.0
mkdir build
cd build
cmake ..

-- POSTGRESQL_PG_CONFIG is /usr/bin/pg_config
-- POSTGRESQL_EXECUTABLE is /usr/lib/postgresql/9.6/bin/postgres
-- POSTGRESQL_VERSION_STRING in FindPostgreSQL.cmake is PostgreSQL 9.6.8
-- PostgreSQL not found.
CMake Error at CMakeLists.txt:294 (message):
   Please check your PostgreSQL installation.

To solve it, you need to install postgres developer

sudo apt-get install postgresql-server-dev-9.6
cmake ..

Could not find the following Boost libraries:

          boost_thread
          boost_system

-- CGAL not found.
CMake Error at CMakeLists.txt:351 (message):
   Please check your CGAL installation, or set correct path to CGAL_INCLUDE_DIR and CGAL_LIBRARIES.

To solve it, you need to install cgal libraries

 sudo apt-get install libcgal-dev
 cmake ..
 make
 sudo make install

To check your pgrouting version, you can ask it from postgres:

psql 'host=localhost port=5432'
CREATE EXTENSION pgrouting;
SELECT  * FROM pgr_version();

 version |  tag   |   hash    | branch | boost  
---------+--------+-----------+--------+--------
 2.4.2   | v2.4.2 | fb7c27bfc | master | 1.62.0
(1 row)

To upgrade to the last version, you need this following sentence:

ALTER EXTENSION pgrouting UPDATE;
SELECT  * FROM pgr_version();

 version |  tag   |  hash   |   branch    | boost  
---------+--------+---------+-------------+--------
 2.6.0   | v2.6.0 | a6226c4 | release/2.6 | 1.62.0
(1 row)

Enjoy it!

Comments

Popular posts from this blog

Exception: Could not find a default OpenFlow controller in Mininet

How to fix Android when developer options are not available for this user

Webcam streaming throught VLC with YUY2 compatibility