Homebrew cannot bind libpng trying to install gdal

I am trying to install gdal via homebrew to start working with topojson, but I keep getting this error and I'm not sure how to resolve it?

k-6177:Cellar k$ brew install gdal
==> Installing dependencies for gdal: libpng, giflib, libtiff, lzlib, proj, libgeotiff, geos, sqlite, freexl, libxml2, json-c, liblwgeom, libspatialite
Error: Cannot link libpng
Another version is already linked: /usr/local/Cellar/libpng/1.6.16
+4
source share
2 answers

Looks like I just needed to change some permissions. I used the following command:

sudo chown -R $(whoami):admin /usr/local
+21
source

I have the same error on macOS.

You must brew link jpeginstall libtiff before installing

I tried to resolve sudo, no luck. I will answer if I find a solution.

0
source

All Articles