Could not symlink lib/pkgconfig/libpng.pc
对于这种错误,执行sudo chown命令。示例:
your_name$ brew install emacs --with-cocoa
...
==> Installing emacs dependency: libpng
==> Downloading https://homebrew.bintray.com/bottles/libpng-1.6.25.el_capitan.bottle.tar.gz
######################################################################## 100.0%
==> Pouring libpng-1.6.25.el_capitan.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 lib/pkgconfig/libpng.pc
/usr/local/lib/pkgconfig is not writable.
You can try again using:
brew link libpng
==> Summary
�� /usr/local/Cellar/libpng/1.6.25: 25 files, 1.2M
...
your_name$ brew link libpng freetype fontconfig pixman pcre glib cairo libtiff gobject-introspection gdk-pixbuf libcroco
Linking /usr/local/Cellar/libpng/1.6.25...
Error: Could not symlink lib/pkgconfig/libpng.pc
/usr/local/lib/pkgconfig is not writable.
your_name$ sudo chown your_name /usr/local/lib/pkgconfig
your_name$ brew link libpng freetype fontconfig pixman pcre glib cairo libtiff gobject-introspection gdk-pixbuf libcroco
Linking /usr/local/Cellar/libpng/1.6.25... 18 symlinks created
Linking /usr/local/Cellar/freetype/2.7... 8 symlinks created
Linking /usr/local/Cellar/fontconfig/2.12.1_2... 222 symlinks created
Linking /usr/local/Cellar/pixman/0.34.0... 5 symlinks created
Linking /usr/local/Cellar/pcre/8.39... 133 symlinks created
Linking /usr/local/Cellar/glib/2.50.1... 145 symlinks created
Linking /usr/local/Cellar/cairo/1.14.6_1... 27 symlinks created
Linking /usr/local/Cellar/libtiff/4.0.6_2... 106 symlinks created
Linking /usr/local/Cellar/gobject-introspection/1.50.0... 19 symlinks created
Linking /usr/local/Cellar/gdk-pixbuf/2.36.0_2... 260 symlinks created
Linking /usr/local/Cellar/libcroco/0.6.11... 8 symlinks created
your_name$