我正在尝试使用Brew在OSX Mavericks上安装gdal。但是,我收到以下错误:
brew install gdal
==> Installing dependencies for gdal: liblwgeom, libspatialite
==> Installing gdal dependency: liblwgeom
==> Downloading http://download.osgeo.org/postgis/source/postgis-2.1.1.tar.gz
Already downloaded: /Library/Caches/Homebrew/liblwgeom-2.1.1.tar.gz
==> Downloading https://gist.github.com/dakcarto/7458788/raw/8df39204eef5a1e5671828ded7f377ad
Already downloaded: /Library/Caches/Homebrew/liblwgeom--patch-3d93c9ede79439f1c683a604f9d906f5c788c690.diff
==> Patching
patching file configure.ac
==> ./autogen.sh
==> ./configure --disable-nls --with-projdir=/usr/local --with-jsondir=/usr/local/opt/json-c
checking for iconv_open in -liconv... yes
checking for iconvctl... no
checking for libiconvctl... no
checking for pg_config... no
configure: error: could not find pg_config within the current path. You may need to try re-running configure with a --with-pg_config parameter.
READ THIS: https://github.com/Homebrew/homebrew/wiki/troubleshooting
我尝试再次安装:
brew install gdal --with-pg-config='/usr/local/bin/pg_config'
但是我得到了同样的错误:
brew install gdal --with-pg-config='/usr/local/bin/pg_config'
==> Installing dependencies for gdal: liblwgeom, libspatialite
==> Installing gdal dependency: liblwgeom
==> Downloading http://download.osgeo.org/postgis/source/postgis-2.1.1.tar.gz
Already downloaded: /Library/Caches/Homebrew/liblwgeom-2.1.1.tar.gz
==> Downloading https://gist.github.com/dakcarto/7458788/raw/8df39204eef5a1e5671828ded7f377ad
Already downloaded: /Library/Caches/Homebrew/liblwgeom--patch-3d93c9ede79439f1c683a604f9d906f5c788c690.diff
==> Patching
patching file configure.ac
==> ./autogen.sh
==> ./configure --disable-nls --with-projdir=/usr/local --with-jsondir=/usr/local/opt/json-c
checking for iconv_open in -liconv... yes
checking for iconvctl... no
checking for libiconvctl... no
checking for pg_config... no
configure: error: could not find pg_config within the current path. You may need to try re-running configure with a --with-pg_config parameter.
READ THIS: https://github.com/Homebrew/homebrew/wiki/troubleshooting
postgres和postgresql都已成功安装。