6

I'm trying to install gdal via homebrew so I can 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
Lars Kotthoff
  • 107,425
  • 16
  • 204
  • 204
moku
  • 4,099
  • 5
  • 30
  • 52

2 Answers2

28

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

sudo chown -R $(whoami):admin /usr/local
moku
  • 4,099
  • 5
  • 30
  • 52
4

I did brew unlink libpng (or any other "already linked" package).

Zhiwei
  • 43
  • 4