I have installed a postgresql 9.1 and postgis 2.0 from source.

I couldn't launch this :

# Add pgRouting launchpad repository ("stable" or "unstable")
sudo add-apt-repository ppa:georepublic/pgrouting[-unstable]
sudo apt-get update

# Install pgRouting packages
sudo apt-get install postgresql-9.1-pgrouting

So I compiled and installed pgrouting 2.0 (after some hours searching for dependencies). I created the extension on my database in postgresql.

I included the function from the sql files pgrouting.sql but the functions I need are in pgrouting_legacy.sql and pgrouting_dd_legacy.sql

When I try to load them, the error I get is : psql:/usr/share/postgresql/9.1/contrib/pgrouting-2.0/pgrouting_legacy.sql:299: ERROR: type "geoms" does not exist

Postgresql and Postgis are working fine...

What did I wrong ? Maybe I forgot something or the install failed ?

I followed this documentation : http://pgrouting.org/docs/1.x/install.html



(1) About compiling problems

You wrote that you compiled PostgreSQL and PostGIS from source. Probably required libraries or header files are not found.

It seems that you are using Ubuntu, so I don't really understand why you don't use the default PostgreSQL and PostGIS packages. For PostGIS 2.0 Launchpad PPA's exist as well.

(2) About using the correct documentation

It seems you read pgRouting 1.x documentation, but you try to install version 2.0. The correct documentation you can find here: http://docs.pgrouting.org/

(3) Better use CREATE EXTENSION pgrouting;

With pgRouting 2.0 (and PostgreSQL 9.1) you can install pgRouting with CREATE EXTENSION pgrouting; and you don't need to install SQL files manually anymore.

In short, for Ubuntu just run:

sudo add-apt-repository ppa:ubuntugis/ppa
sudo add-apt-repository ppa:georepublic/pgrouting
sudo apt-get update
sudo apt-get install postgresql-9.1-pgrouting postgresql-9.1-postgis-2.0

The connect to the database and run:

  • Thank you for your response. I realized that I can not run the legacy functions in pgrouting 2.0. For the install of PostgreSql and PostGis, I had to compile them because the default install didn't worked. I had to set some options when I launched ./configure ... So, It worked when I installed it by the repository of Ubuntu. Thank you agaain. – Mirza Selimovic Oct 31 '13 at 13:58
  • Mirza: if your problem is solved, you should upvote the answer (arrow above the number on the left size) and mark it as "the answer". – BradHards Nov 1 '13 at 10:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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