libpng Not Symlinking When Installing ImageMagick on OS X Yosemite


After upgrading from OS X Mavericks to OS X Yosemite, I attempted to install ImageMagick from Homebrew, but encountered an error when brew was trying to install the libpng dependency.

The error encountered was:

[20:32:21][user@workstation][~] brew install libpng
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/libpng-1.6.14.yosemite.bottle.tar.gz
Already downloaded: /Library/Caches/Homebrew/libpng-1.6.14.yosemite.bottle.tar.gz
==> Pouring libpng-1.6.14.yosemite.bottle.tar.gz
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink share/man/man5/png.5
/usr/local/share/man/man5 is not writable.

You can try again using:
  brew link libpng
==> Summary
/usr/local/Cellar/libpng/1.6.14: 17 files, 1.2M

I tried several of the potential fixes in an older StackOverflow thread about OS X Lion trouble with ImageMagick, but nothing worked.

I finally tried Jonghee Park’s suggestion to correct permissions.

Sure enough, the permissions for the man5 folder in /usr/local/share/man were incorrect:

[20:34:12][user@workstation][index_page] ls -al /usr/local/share/man
total 8
drwxr-xr-x  19 user  admin   646 Nov 23 20:34 .
drwxr-xr-x  11 user  admin   374 Nov 23 20:29 ..
drwxr-xr-x   3 user  admin   102 Oct 19 17:29 de
drwxr-xr-x   3 user  admin   102 Oct 19 17:29 es
drwxr-xr-x   3 user  admin   102 Oct 19 17:29 fr
drwxr-xr-x   3 user  admin   102 Oct 19 17:29 hr
drwxr-xr-x   3 user  admin   102 Oct 19 17:29 hu
drwxr-xr-x   3 user  admin   102 Oct 19 17:29 it
drwxr-xr-x   3 user  admin   102 Oct 19 17:29 ja
drwxr-xr-x  48 user  admin  1632 Nov 23 20:32 man1
drwxr-xr-x   3 root  wheel   102 Aug 31 00:00 man5
drwxr-xr-x   3 user  admin   102 Oct 19 17:29 pl
drwxr-xr-x   3 user  admin   102 Oct 19 17:29 pt_BR
drwxr-xr-x   3 user  admin   102 Oct 19 17:29 pt_PT
drwxr-xr-x   3 user  admin   102 Oct 19 17:29 ro
drwxr-xr-x   3 user  admin   102 Oct 19 17:29 ru
drwxr-xr-x   3 user  admin   102 Oct 19 17:29 sk
-rw-r--r--   1 root  admin  1544 Nov 21 00:55 whatis
drwxr-xr-x   3 user  admin   102 Oct 19 17:29 zh

The fix was as simple as running the following command:

sudo chown -R user:admin /usr/local/share/man/man5

And, re-running brew link libpng.

This problem did not occur with a fresh install of OS X Yosemite.

tags

active-directory (1)


ads (1)


aix (2)


ambient-noise (1)


amd (2)


android (1)


ansible (6)


apache (2)


api (2)


apple (7)


apple-tv (1)


apt (1)


awk (1)


bash (1)


bittorrent (2)


bootstrap (3)


centos (7)


cheat-sheet (14)


chef (1)


chromeos (1)


cloud (1)


cmatrix (1)


cobbler (3)


cowboy-bebop (1)


curl (1)


darwin-streaming-server (1)


datadog (1)


ddclient (1)


debian (2)


dell (3)


development (2)


diagrams (2)


disqus (1)


dlna (1)


dns (1)


docker (1)


documentation (153)


doxie (2)


dvdbackup (1)


ejabberd (2)


exiftool (1)


fedora (6)


ffmpeg (2)


filevault (1)


find (1)


firefly (1)


git (1)


glance (1)


gluster (2)


gnome (1)


golang (1)


google-app-engine (2)


google-chrome (1)


google-chromecast (1)


google-cloud-dns (1)


google-cloud-functions (1)


google-cloud-platform (5)


google-cloud-pubsub (1)


google-drive (1)


google-kubernetes-engine (1)


handbrake (1)


icloud (2)


idrac (3)


imagemagick (1)


ios (3)


iphone (3)


iscsi (1)


java (1)


javascript (1)


jekyll (6)


jquery (3)


json (3)


kerberos (1)


keystone (1)


kickstart-profiles (7)


kubernetes (2)


kvm (2)


ldap (6)


lego (1)


lets-encrypt (1)


linux (18)


macbook (3)


macos (2)


markdown (1)


mdadm (1)


mechanical-keyboards (1)


megacli (1)


microdata (1)


msi-gs65-stealth-thin (2)


mysql (1)


namecheap (1)


networking (1)


neutron (2)


nfs (1)


nova-network (2)


openssl (2)


openstack (21)


opinions (9)


os-x (4)


os-x-mavericks (1)


os-x-mountain-lion (2)


os-x-yosemite (6)


parted (1)


preseed (1)


python (4)


quantum (1)


racadm (2)


rackspace-private-cloud (3)


raid (2)


red-hat (8)


red-hat-satellite-server (2)


reviews (7)


rfid (1)


rhel (7)


rpm (1)


rss (1)


safari (1)


samsung (1)


scp (1)


scsi (1)


security (3)


sed (1)


seo (2)


shell (10)


skippy (2)


snappass (1)


solaris (3)


spotlight (1)


ssd (2)


ssh (1)


sshpass (1)


ssl (1)


sssd (1)


stackdriver (1)


star-wars (1)


steam (1)


storage (1)


support (2)


swift (6)


terminal (1)


thinkpad (1)


transmission (2)


troubleshooting (1)


ubuntu (9)


usb-c (1)


vagrant (11)


varnish (2)


virtualbox (8)


vmware-fusion (10)


wallets (1)


web-analytics (1)


wifi (1)


windows (2)


windows-10 (1)


windows-7 (2)


windows-server (1)


world-of-warcraft (1)


xrdp (1)


xserver (1)


zfs (1)