sudo npm install sharp
报错:
ERROR: Please install libvips by running: brew install homebrew/science/vips --with-webp --with-graphicsmagick
根据提示安装libvips
$ brew install homebrew/science/vips --with-webp --with-graphicsmagick
安装过程如下:
192:~ simple$ brew install homebrew/science/vips --with-webp --with-graphicsmagick
==> Installing vips from homebrew/science
==> Installing dependencies for homebrew/science/vips: jpeg, icu4c, harfbuzz, pygobject3, sqlite, graphicsmagick
==> Installing homebrew/science/vips dependency: jpeg
==> Downloading https://homebrew.bintray.com/bottles/jpeg-8d.el_capitan.bottle.2.tar.gz
Already downloaded: /Library/Caches/Homebrew/jpeg-8d.el_capitan.bottle.2.tar.gz
==> Pouring jpeg-8d.el_capitan.bottle.2.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/man1/jpegtran.1
Target /usr/local/share/man/man1/jpegtran.1
already exists. You may want to remove it:
rm '/usr/local/share/man/man1/jpegtran.1' To force the link and overwrite all conflicting files:
brew link --overwrite jpeg To list all files that would be deleted:
brew link --overwrite --dry-run jpeg Possible conflicting files are:
/usr/local/share/man/man1/jpegtran.1
/usr/local/share/man/man1/rdjpgcom.1
/usr/local/share/man/man1/wrjpgcom.1
==> Summary