无法'brew link'imagemagick

use*_*669 8 ruby homebrew rmagick imagemagick

我正在尝试通过brew安装Imagemagick,我在安装时收到此消息:

    Warning: imagemagick-6.8.6-3 already installed, it's just not linked
Run Code Online (Sandbox Code Playgroud)

当我尝试通过brew链接链接它时,我得到了这个:

    brew link imagemagick
    Warning: Could not link imagemagick. Unlinking...
    Linking /usr/local/Cellar/imagemagick/6.8.6-3... 
    Error: File exists - /usr/local/etc
Run Code Online (Sandbox Code Playgroud)

想法?我试过了:

    'brew link -f imagemagick' 
Run Code Online (Sandbox Code Playgroud)

没有运气(我得到与上面相同的错误信息).这里建议:使用ImageMagick进行Brew链接

根据brew更新,我是最新的.Brew医生回复此信息:

    Warning: You have MacPorts or Fink installed:
    /Users/user_name/.rvm/bin/port, /opt/local/bin/port

    This can cause trouble. You don't have to uninstall them, but you may want to
    temporarily move them out of the way, e.g.

    sudo mv /opt/local ~/macports

   Warning: You have unlinked kegs in your Cellar
   Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
   those kegs to fail to run properly once built. Run `brew link` on these:

   imagemagick
Run Code Online (Sandbox Code Playgroud)

fro*_*rik 2

您需要删除 imagemagick 文件,/usr/local/etc以便brew 可以在那里写入一个新文件。

旧文件是由不是brew 的其他东西放在那里的。可能是另一个包管理器。

更新 2015.03.07:正如 Chords 在上面的评论中指出的那样,可能有必要完全删除该文件夹。(尽管设置正确的权限和组可能是等效的措施。)