5

On my Mac, running OS X 10.10.5 and I installed Grass with homebrew:

brew tap osgeo/osgeo4mac
brew install grass-70

Unfortunately, I cannot choose the pg driver in the db.login menu.

enter image description here

Can anyone tell me how to install it or how to brew Grass with the pg driver activated?

  • Questions about compiling software, even GIS software, are general software development problems, more suited to Stack Overflow – Vince Oct 14 '15 at 13:31
  • 5
    The question is regarding a specific aspect relating to gis and not a general installation question. Asking this question on a non-gis group would likely not have attracted attention. – Rainer Oct 14 '15 at 22:00
  • 1
    As Rainer said, I believe I would not have received an answer on any other SE site. The availability and description of the tags installation and installer suggests that setup of GIS software seems to be part of GIS.stackexchange.com. Somehow I can't seem to add the latter tag. – n1000 Oct 15 '15 at 6:58
  • 2
    @Mapperz I am still puzzeled that this question was closed. GIS.SE is full with these kind of questions... – n1000 Jan 8 '16 at 22:09
8

When you look at the grass-70 recipe info from homebrew, you'll see:

Rainers-MacBook-Pro:~ rainerkrug$ brew info grass-70
osgeo/osgeo4mac/grass-70: stable 7.0.1
Geographic Resources Analysis Support System
http://grass.osgeo.org/
/usr/local/Cellar/grass-70/7.0.1 (3708 files, 83M) *
  Built from source with: --with-mysql --with-postgresql --with-liblas
From: https://github.com/osgeo/homebrew-osgeo4mac/blob/master/Formula/grass-70.rb
==> Dependencies
Build: pkg-config ✔
Required: gettext ✔, readline ✔, gdal ✔, libtiff ✔, unixodbc ✔, fftw ✔, wxpython ✔, cairo ✔, ghostscript ✔
Optional: openblas ✘, liblas ✔, netcdf ✔, ffmpeg ✔
==> Options
--with-ffmpeg
    Build with ffmpeg support
--with-liblas
    Build with liblas support
--with-mysql
    Build with mysql support
--with-netcdf
    Build with netcdf support
--with-openblas
    Build with openblas support
--with-postgresql
    Build with postgresql support
--without-gui
    Build without WxPython interface. Command line tools still available.
Rainers-MacBook-Pro:~ rainerkrug$

The important line is:

--with-postgresql
    Build with postgresql support

In other words - the default install of grass-70 via homebrew does not include postgresql support.

So to install grass with postgresql, you have to use:

brew install grass-70 --with-postgresql

This will also install all the necessary dependencies.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.