I'm trying to install postgis using my existent version of postgresql.
I tried doing: brew install postgis
. But I'm getting the following error trying run create extension postgis;
query
PG::UndefinedFile: ERROR: could not open extension control file "/opt/boxen/homebrew/Cellar/postgresql/9.3.2-boxen/share/postgresql/extension/postgis.control": No such file or directory
This is happening because brew is installing a fresh version of postgresql. When I inspect on the new postgres path I can find the missing postgis.control file.
So, the question is: how can I force postgis to use my existent postgresql installation?
(I'm using boxen, so It's not an option remove my actual postgres installation)
-
kyngchaos.com/software/postgres is the best and quickest methodMapperz– Mapperz ♦2014年09月09日 20:06:25 +00:00Commented Sep 9, 2014 at 20:06
-
@Mapperz it didn't work. The installer requires version 9.3 exactly. I'm not be able to do downgrade to that version.Leantraxxx– Leantraxxx2014年09月20日 22:26:35 +00:00Commented Sep 20, 2014 at 22:26
2 Answers 2
I had to compile postgis from source. I made a gist that solve the problem...
I was able to install PostGIS on OSX an old Postgres version without upgrading or manual compilation using Pex:
git clone git://github.com/petere/pex.git
cd pex
sudo make install
pex init
pex install postgis
psql
CREATE EXTENSION postgis;