Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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
add comment

4 Answers 4

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

share|improve this answer
add comment

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
add comment

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

  1. library(librouting.so) exists. (In my environment, "/usr/local/Cellar/postgresql/9.1.3/lib/librouting.so").
  2. check "otool -L librouting.so" 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
add comment

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 librouting.so is copied to the right folder.

share|improve this answer
add comment

Your Answer

 
discard

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.