Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to run the sql file of pgrouting-> routing_core.sql in mac. However it displays the following error

psql:routing_core.sql:32: Error:  could not access file "$libdir/librouting": No such file or directory

How can I remove this?

share|improve this question

Probably something went wrong when you compiled pgRouting as the libraries are not where they should be.

share|improve this answer

You have to modify the CMakeCache.txt in the pgrouting folder and update the line which contains POSTGRESQL_EXECUTABLE:FILEPATH=/usr/lib/postgresql/9.1/lib.

After you execute the command cmake -DWITH_TSP=ON -DWITH_DD=ON and the lib is copied to the right folder.

share|improve this answer

Its installation issue. You didn't copy the dll files. You should check the installation instructions because different versions of pgrouting are installed differently. If I remember correctly, these are 3 files that you missed.

share|improve this answer

I am not familiar with mac, but check the following things.

  1. library( exists. (In my environment, "/usr/local/Cellar/postgresql/9.1.3/lib/").
  2. check "otool -L" result. (In my environment, "/usr/local/lib/libgmp.10.dylib (...), /usr/lib/libstdc++.6.dylib (...), /usr/lib/libSystem.B.dylib (...))
share|improve this answer
I don't remember the link where I got this, but I need to change $libdir/librouting to something else with absolute path. I don't have the link but the issue is fixed. Thanks everyone for your time and suggestions :) – rajan sthapit May 31 '12 at 19:55

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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