0

I installed postgres with EDB installer. I wanted to use pgrouting in my database. So I downloaded it through homebrew brew install pgrouting

Next, I wanted to initalize it in my database: psql mydatabase -c "create extension pgrouting;"

But I got this error ERROR: could not open extension control file "/Library/PostgreSQL/9.6/share/postgresql/extension/pgrouting.control": No such file or directory

I found pgrouting.control in /usr/local/Cellar/pgrouting/2.4.1/share/postgresql/extension/pgrouting.control

Should I just copy those files from /usr... to /Library/Postgres... ??

user3613919
  • 777
  • 1
  • 7
  • 17
  • https://github.com/pgRouting/pgrouting/issues/795 << I described (sort of) in very unprofessional way how to get around it – user3613919 May 22 '17 at 00:11

2 Answers2

1

Yup that sounds like a reasonable solution.

Stephen Woodbridge
  • 1,100
  • 1
  • 8
  • 16
  • I did, then it demanded lib file :) I did solve it by VERY UNPROFESSIONAL. I described it here: https://github.com/pgRouting/pgrouting/issues/795 – user3613919 May 22 '17 at 00:11
0

Personally, doing the following worked for me just fine:

  • install pgrouting via homebrew
  • find all the .sql scripts related to pgrouting in the following location: /opt/homebrew/Cellar/pgrouting/HEAD-441037f/share/postgresql@14/extension
    • copy and paste all those into the path where the postgres contents area located -> /Applications/Postgres.app/Contents/Versions/14/share/postgresql/extension
  • lastly, copy the following .so file /opt/homebrew/Cellar/pgrouting/HEAD-441037f/lib/postgresql@14/libpgrouting-3.4.so into the respective location within the Postgres contents -> /Applications/Postgres.app/Contents/Versions/14/lib/postgresql