Nous utilisons des cookies pour vous garantir la meilleure expérience sur notre site. Si vous continuez à utiliser ce dernier, nous considèrerons que vous acceptez l'utilisation des cookies. J'ai compris ! ou En savoir plus !.
banniere

Le portail francophone de la géomatique


Toujours pas inscrit ? Mot de passe oublié ?
Nom d'utilisateur    Mot de passe              Toujours pas inscrit ?   Mot de passe oublié ?

Annonce

Printemps des cartes 2024

#1 Wed 22 August 2012 08:20

gigi6523
Participant occasionnel
Date d'inscription: 12 Dec 2011
Messages: 39

comment installer pgrouting sur redhat 6 ou centos 6

bonjour
j'ai trouvé de la doc pour installer pgrouting sur centos5 (http://www.pgrouting.org/docs/1.x/install_centos.html)
mais je suis sur la version 6.3 et j'ai une erreur quand j'execute la derniere instruction: sudo make install,
j'ai l'erreur "This header is deprecated. Please use: boost/type_traits/is_same.hpp" et en rouge est inscrite "linking librouting.so" avant
l'affichage de l'erreur.

Je pense que c'est dû au fait que je suis sur du 6 alors que les instructions sont pour du 5!
Cdl


Code:

Dans le fichier inclus à partir de /usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/backward/hash_set:60,
          à partir de /usr/include/boost/graph/adjacency_list.hpp:25,
          à partir de /home/moi/pgrouting/core/src/shooting_star_boost_wrapper.cpp:25:
/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/backward/backward_warning.h:28:2: attention : #warning This file includes at least one deprecated or antiquated header which may be removed without further notice at a future date. Please use a non-deprecated interface with equivalent functionality instead. For a listing of replacement headers and interfaces, consult the file backward_warning.h. To disable this warning use -Wno-deprecated.
Dans le fichier inclus à partir de /home/moi/pgrouting/core/src/edge_visitors.hpp:9,
          à partir de /home/moi/pgrouting/core/src/shooting_star_search.hpp:28,
          à partir de /home/moi/pgrouting/core/src/shooting_star_boost_wrapper.cpp:27:
/usr/include/boost/graph/detail/is_same.hpp:17:4: attention : #warning "This header is deprecated. Please use: boost/type_traits/is_same.hpp"
Linking CXX shared library ../../lib/librouting.so
/usr/bin/ld: cannot find -lgmp
collect2: ld a retourné 1 code d'état d'exécution

Dernière modification par gigi6523 (Wed 22 August 2012 19:16)

Hors ligne

 

#2 Wed 22 August 2012 20:12

gigi6523
Participant occasionnel
Date d'inscription: 12 Dec 2011
Messages: 39

Re: comment installer pgrouting sur redhat 6 ou centos 6

résolu: il ne faut pas oublier d'installer la librairie GMP


http://gmplib.org/

Dernière modification par gigi6523 (Wed 22 August 2012 20:15)

Hors ligne

 

#3 Wed 22 August 2012 21:27

gigi6523
Participant occasionnel
Date d'inscription: 12 Dec 2011
Messages: 39

Re: comment installer pgrouting sur redhat 6 ou centos 6

j'essaie de faire executer le fichier routing_core.sql mais j'ai l'erreur:

ERROR:  could not load library "/opt/PostgreSQL/8.4/lib/librouting.so": libgmp.so.10: Ne peut ouvrir le fichier d'objet partagé: Aucun fichier ou dossier de ce type


********** Erreur **********

ERROR: could not load library "/opt/PostgreSQL/8.4/lib/librouting.so": libgmp.so.10: Ne peut ouvrir le fichier d'objet partagé: Aucun fichier ou dossier de ce type
État SQL :58P01


voici le sql ci dessous,  '/opt/PostgreSQL/8.4/lib' est le dossier dans lequel j'ai mis librouting.so


Code:

--
-- Copyright (c) 2005 Sylvain Pasche,
--               2006-2007 Anton A. Patrushev, Orkney, Inc.
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
--


CREATE TYPE path_result AS (vertex_id integer, edge_id integer, cost float8);
CREATE TYPE vertex_result AS (x float8, y float8);

-----------------------------------------------------------------------
-- Core function for shortest_path computation
-- See README for description
-----------------------------------------------------------------------
CREATE OR REPLACE FUNCTION shortest_path(sql text, source_id integer, 
        target_id integer, directed boolean, has_reverse_cost boolean)
        RETURNS SETOF path_result
        AS  '/opt/PostgreSQL/8.4/lib/librouting'
        LANGUAGE 'C' IMMUTABLE STRICT;

-----------------------------------------------------------------------
-- Core function for shortest_path_astar computation
-- Simillar to shortest_path in usage but uses the A* algorithm
-- instead of Dijkstra's.
-----------------------------------------------------------------------
CREATE OR REPLACE FUNCTION shortest_path_astar(sql text, source_id integer, 
        target_id integer,directed boolean, has_reverse_cost boolean)
         RETURNS SETOF path_result
         AS '/opt/PostgreSQL/8.4/lib/librouting'
         LANGUAGE 'C' IMMUTABLE STRICT; 

-----------------------------------------------------------------------
-- Core function for shortest_path_astar computation
-- Simillar to shortest_path in usage but uses the Shooting* algorithm
-----------------------------------------------------------------------
CREATE OR REPLACE FUNCTION shortest_path_shooting_star(sql text, source_id integer, 
        target_id integer,directed boolean, has_reverse_cost boolean)
         RETURNS SETOF path_result
         AS  '/opt/PostgreSQL/8.4/lib/librouting'
         LANGUAGE 'C' IMMUTABLE STRICT; 

-----------------------------------------------------------------------
-- This function should not be used directly. Use create_graph_tables instead
--
-- Insert a vertex into the vertices table if not already there, and
--  return the id of the newly inserted or already existing element
-----------------------------------------------------------------------
CREATE OR REPLACE FUNCTION insert_vertex(vertices_table varchar, 
       geom_id anyelement) 
       RETURNS int AS
$$
DECLARE
        vertex_id int;
        myrec record;
BEGIN
        LOOP
          FOR myrec IN EXECUTE 'SELECT id FROM ' || 
                     quote_ident(vertices_table) || 
                     ' WHERE geom_id = ' || quote_literal(geom_id)  LOOP

                        IF myrec.id IS NOT NULL THEN
                                RETURN myrec.id;
                        END IF;
          END LOOP; 
          EXECUTE 'INSERT INTO ' || quote_ident(vertices_table) || 
                  ' (geom_id) VALUES (' || quote_literal(geom_id) || ')';
        END LOOP;
END;
$$
LANGUAGE 'plpgsql' VOLATILE STRICT;

Hors ligne

 

#4 Thu 23 August 2012 11:15

Nicolas Ribot
Membre
Lieu: Toulouse
Date d'inscription: 9 Sep 2005
Messages: 1536

Re: comment installer pgrouting sur redhat 6 ou centos 6

Bonjour,

Vous avez relancé ldconfig et mis le chemin vers les lib pgRouting dans /etc/ld.so.conf ?
Dans des installations mettant les choses dans /opt, il se peut que les repertoires des libs ne soient pas configurés dans ld.so.conf

Nicolas

Hors ligne

 

#5 Fri 24 August 2012 18:06

gigi6523
Participant occasionnel
Date d'inscription: 12 Dec 2011
Messages: 39

Re: comment installer pgrouting sur redhat 6 ou centos 6

dans /usr/local/lib  se trouve le fichier libgmp.so.10.0.5 , je re recopie dans /opt/PostgreSQL/8.4/lib et je reexecute la requete ca marche le core de pgrouting s'installe.

Mais j'ai un autre probleme je souhaite installer la fontion driving_distance selon le tutoriel : http://www.pgrouting.org/docs/1.x/insta … t=distance

je tape :

cd /home/moi/pgrouting/
sudo /home/moi/pgrouting/cmake-2.4.8/bin/cmake -DWITH_TSP=ON -DWITH_DD=ON .


masi j'ai le retour suivant:

Code:

Boost headers were found here: /usr/include
Output directory for libraries is set to /usr/lib64/pgsql
Installation directory for libraries is set to /usr/lib64/pgsql and for SQL files is set to /usr/share/pgrouting
Installation directory for libraries is set to /usr/lib64/pgsql
-- CGAL not found.
FATALERROR Please check your CGAL installation, or set correct path to CGAL_INCLUDE_DIR and CGAL_LIBRARIES.
CMake Error: This project requires some variables to be set,
and cmake can not find them.
Please set the following variables:
CGAL_INCLUDE_DIR (ADVANCED)
CGAL_LIBRARIES (ADVANCED)

-- Configuring done

Hors ligne

 

#6 Mon 27 August 2012 15:54

Nicolas Ribot
Membre
Lieu: Toulouse
Date d'inscription: 9 Sep 2005
Messages: 1536

Re: comment installer pgrouting sur redhat 6 ou centos 6

Bonjour,

Il faut bien vérifier les install de boost et cgal, qui, de mon souvenir, ne sont pas tres facile a installer.
En gros, il faut mettre a jour les variables indiquées dans le message d'erreur en les faisant pointer sur les bons repertoires.

Nicolas

Hors ligne

 

Pied de page des forums

Powered by FluxBB