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 installed both postgresql and postgis using brew in mac. How can I now install pgrouting. I couldn't install it using brew. Any suggestions?

share|improve this question

2 Answers 2

up vote 1 down vote accepted

I think that if you build on MacOSX, pgrouting git-master version is necessary.
See another question (How to solve the “Undefined symbols in librouting.dylib” issue on Mac Os X?).

$ cd ~/
$ mkdir -p Build/cpp/pgrouting-git
$ cd Build/cpp/pgrouting-git
$ git clone git://github.com/pgRouting/pgrouting.git .
$ mkdir build
$ cd build
$ cmake -DPOSTGRESQL_INCLUDE_DIR='/usr/local/Cellar/postgresql/9.1.3/include/server' -DBoost_DIR='/usr/local/Cellar/boost/1.49.0' ..
$ vi ../core/src/edge_visitors.hpp
-- edit as follows.
-- #include <boost/graph/detail/is_same.hpp>
--  => #include <boost/type_traits/is_same.hpp>
$ make
$ sudo make install
share|improve this answer
    
I tried to install it as you said. But it agains says Could not find Boost FATAL ERROR Please check your Boost installation. I have already installed boost using homebrew. Is there anything else that I should do? –  rajan sthapit May 30 '12 at 14:30
    
I have got the following errorcmake -DPOSTGRESQL_INCLUDE_DIR='/usr/local/Cellar/postgresql/9.1.2/include/server/' -DBOOST_DIR='/usr/local/Cellar/boost/1.49.0/include/boost/' -- Could NOT find Boost FATALERROR Please check your Boost installation Output directory for libraries is set to /usr/lib/postgresql –  rajan sthapit May 30 '12 at 14:46
    
I had installed boost from cgal dependencies with homebrew. In my environment, "brew info boost" result is as follows boost 1.49.0 boost.org /usr/local/Cellar/boost/1.49.0 (9053 files, 239M) * github.com/mxcl/homebrew/commits/master/Library/Formula/boostrb –  sanak May 30 '12 at 15:45
    
I have the same in mine as well –  rajan sthapit May 30 '12 at 15:50
    
-DBoost_DIR word must be case sensitive, and suffix should be "~/1.49.0" (last "/include/boost" word is not necessary). –  sanak May 30 '12 at 15:54

You can download Mac OS X installers from this website: http://www.kyngchaos.com/software/postgres

I don't know this is compatible with what you installed using brew, but the PostgreSQL/PostGIS binaries you can get from that website should work well, too.

share|improve this answer
    
I don't think it is compatible with the one I installed using brew –  rajan sthapit May 29 '12 at 13:03
    
I tried to install it from the source using cmake. But it said it couldn't find boost. So I installed it using brew (brew install boost) but still it says it cannot find boost. –  rajan sthapit May 29 '12 at 13:18
    
kyngchaos's installer unfortunately does not allow itself to work with postgresql 9.2 –  boulder_ruby Sep 7 '13 at 1:41

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.