-
-
Save gopperman/18cb66078372d3261420829630230b80 to your computer and use it in GitHub Desktop.
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/aa049a47b218fda30f9a4a454119ae067a02cf50/Formula/postgis.rb | |
#pg_config --pkglibdir is useful for finding your $libdir | |
cp -a /usr/local/share/postgresql/extension/postgis* /usr/local/Cellar/[email protected]/9.6.5/share/[email protected]/extension/ | |
cp -a /usr/local/lib/postgresql/postgis-2.3.so /usr/local/Cellar/[email protected]/9.6.5/lib/postgis-2.3 | |
cp -a /usr/local/lib/postgresql/rtpostgis-2.3.so /usr/local/Cellar/[email protected]/9.6.5/lib/ | |
Ok. I tried it, but had a number of issues. first of all I needed to use ln -s
instead of cp-a
.
Perfect thank you ! I had also an error not found /usr/local/opt/proj/lib/libproj.12.dylib
, but I had /usr/local/opt/proj/lib/libproj.13.dylib
. So i did ln -sf /usr/local/lib/libproj.13.dylib /usr/local/lib/libproj.12.dylib
which is probably not a good thing to do, but it worked ^^
Updated commands for postgis 2.3 with [email protected] 9.6.9:
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/aa049a47b218fda30f9a4a454119ae067a02cf50/Formula/postgis.rb
#pg_config --pkglibdir is useful for finding your $libdir
ln -s /usr/local/share/postgresql/extension/postgis* /usr/local/Cellar/[email protected]/9.6.9/share/[email protected]/extension
ln -s /usr/local/lib/postgresql/postgis-2.3.so /usr/local/Cellar/[email protected]/9.6.9/lib/postgis-2.3
ln -s /usr/local/lib/postgresql/rtpostgis-2.3.so /usr/local/Cellar/[email protected]/9.6.9/lib/
# Fixes issues with missing
brew reinstall gdal2
After execute brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/aa049a47b218fda30f9a4a454119ae067a02cf50/Formula/postgis.rb
I'm receiving Postgresql 10.4 installed as dependency
Warning: postgis 2.4.4_1 is available and more recent than version 2.3.2.
==> Installing dependencies for postgis: postgresql
==> Installing postgis dependency: postgresql
==> Downloading https://homebrew.bintray.com/bottles/postgresql-10.4.high_sierra.bottle.tar.gz
I cannot create extension because:
hrm=# CREATE EXTENSION postgis;
ERROR: could not load library "/usr/local/Cellar/[email protected]/9.6.9/lib/postgis-2.3": dlopen(/usr/local/Cellar/[email protected]/9.6.9/lib/postgis-2.3, 10): Library not loaded: /usr/local/opt/proj/lib/libproj.12.dylib
Referenced from: /usr/local/Cellar/[email protected]/9.6.9/lib/postgis-2.3
Reason: image not found
gdal2 not found in brew
brew reinstall gdal2
Error: No available formula with the name "gdal2"
Tried to reinstall gdal, but it not solved problem of extension creation
Trying to install PostGIS to work with existing Postgres 9.6. The above installed PostgreSQL 11.1, and failed to install PostGIS. Got this:
==> Pouring postgis-2.3.2.high_sierra.bottle.tar.gz
Error: undefined method `undent' for #<String:0x00007f80feb5d228>
Please report this bug:
https://docs.brew.sh/Troubleshooting
/Users/khommel/Library/Caches/Homebrew/Formula/postgis.rb:132:in `caveats'
/usr/local/Homebrew/Library/Homebrew/caveats.rb:17:in `caveats'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/forwardable.rb:202:in `empty?'
/usr/local/Homebrew/Library/Homebrew/formula_installer.rb:613:in `caveats'
/usr/local/Homebrew/Library/Homebrew/formula_installer.rb:664:in `finish'
/usr/local/Homebrew/Library/Homebrew/cmd/install.rb:330:in `install_formula'
/usr/local/Homebrew/Library/Homebrew/cmd/install.rb:259:in `block in install'
/usr/local/Homebrew/Library/Homebrew/cmd/install.rb:257:in `each'
/usr/local/Homebrew/Library/Homebrew/cmd/install.rb:257:in `install'
/usr/local/Homebrew/Library/Homebrew/brew.rb:89:in `<main>'
Hey! This could be just what I need!! What is the first command exactly doing? What version of PostGIS is that? Oh, and I probably need to do some kind of
ALTER EXTENSION postgis TO ...
, right?