用homebrew的时候经常遇到symlinks出错,

1
2
3
4
Linking /usr/local/Cellar/libpng/1.5.13... Warning: Could not link libpng. Unlinking...

Error: Could not symlink file: /usr/local/Cellar/libpng/1.5.13/share/man/man5/png.5
/usr/local/share/man/man5 is not writable. You should change its permissions.

需要修改目录拥有者,

1
sudo chown -R `whoami` /usr/local/share/man/man5