Skip to content

Instantly share code, notes, and snippets.

@bsharpe
Last active October 17, 2023 22:00
Show Gist options
  • Save bsharpe/58aaf94d8447851ecf5c857b6f616d0e to your computer and use it in GitHub Desktop.
Save bsharpe/58aaf94d8447851ecf5c857b6f616d0e to your computer and use it in GitHub Desktop.
Installing PostGIS 2.5.5 onto Postgresql@11 -- Mac OS X
  • brew install postgresql@11
  • go to https://postgis.net/ and download 2.5.x
  • extract
  • cd into folder
  • brew install proj pcre json-c
  • use brew info proj / pcre / json-c to find the following directories
./configure --with-projdir=/usr/local/Cellar/proj/7.0.0 --with-jsondir=/usr/local/Cellar/json-c/0.13.1 --with-pcredir=/usr/local/Cellar/pcre/8.44
make
make install
@efiul
Copy link

efiul commented Apr 18, 2023

I am trying to install PostGis 2.5 onto Postgrsql@11 on Mac and I can't.
I did what you wrote here but I am not sure what you mean by the last line:
"use brew info proj / pcre / json-c to find the following directories"

If I run the "./configure...." line, I get the following error:
configure: error: the --with-projdir directory "/usr/local/Cellar/proj/7.0.0" cannot be found

Can you help me please?

@robe2
Copy link

robe2 commented Apr 18, 2023

@efiul did you try

brew info proj

as @bsharpe stated and use that version

My guess is you have a newer version since you installed postgresql 14 and postgis from brew.

@tommasina-va
Copy link

I'm very grateful for these steps, thank you! FWIW, I also had to add a flag for protobuf: --with-protobuf=/opt/homebrew/Cellar/protobuf-c/1.4.1_7/include in the configure step. Then everything was golden.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment