Brew linking with ImageMagick

2019-04-30 01:58发布

Installing: ostaptan:~ ostap$ brew install imagemagick --disable-openmp --from-source

==> Downloading http://downloads.sf.net/project/machomebrew/mirror/ImageMagick-6.7.7-6.tar.bz2
Already downloaded: /Library/Caches/Homebrew/imagemagick-6.7.7-6.tar.bz2
==> Patching
patching file configure
Hunk #1 succeeded at 32371 (offset 447 lines).
==> ./configure --disable-osx-universal-binary --without-perl --prefix=/usr/local/Cellar/imagemagick/6.7.7-6 --enable-shared --disable-static
==> make install
Error: The linking step did not complete successfully
The formula built, but is not symlinked into /usr/local
You can try again using `brew link imagemagick'
==> Summary
/usr/local/Cellar/imagemagick/6.7.7-6: 1388 files, 32M, built in 61 seconds

linking after bad linking in install:

ostaptan:wand ostap$ brew link imagemagick

Linking /usr/local/Cellar/imagemagick/6.7.7-6...

Error: Could not symlink file: /usr/local/Cellar/imagemagick/6.7.7-6/include/ImageMagick/wand/wand-view.h

Target /usr/local/include/ImageMagick/wand/wand-view.h already exists. You may need to delete it.

To force the link and delete this file, do:
  brew link -f formula_name

To list all files that would be deleted:
  brew link -n formula_name

How to link??? what to do?? Can't find answers anywhere!

3条回答
放我归山
2楼-- · 2019-04-30 02:42

As suggested in the brew link output, try

brew link -f imagemagick

This should clean up old links in /usr/local/include/ImageMagick/, and then link the files required to complete the installation.

If this doesn't work check that your user has permission to write to /usr/local/include/ImageMagick/*.

查看更多
等我变得足够好
3楼-- · 2019-04-30 02:42

After hours and hours of trying the only thing that worked for me was:

sudo brew link --overwrite imagemagick

(Also requires /usr/local/bin/brew to be chowned to root)

查看更多
ゆ 、 Hurt°
4楼-- · 2019-04-30 02:56

Homebrew does not support the overwrite sudo command anymore.

sudo brew link --overwrite imagemagick

Error: Running Homebrew as root is extremely dangerous and no longer supported. As Homebrew does not drop privileges on installation you would be giving all build scripts full access to your system.

查看更多
登录 后发表回答