Brew ビルドが失敗しました。医師が報告したこれらの問題を Brew で修正するにはどうすればよいでしょうか?

Brew ビルドが失敗しました。医師が報告したこれらの問題を Brew で修正するにはどうすればよいでしょうか?

プログラミングをしたいのですが、代わりに管理者をしています。brew で imagemagick をインストールしたいのですが、ビルドに失敗します。1) brew doctor は次のように言います:

Warning: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and what additional flags to use when
compiling and linking.

Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew provided
script of the same name. We found the following "config" scripts:

  /opt/local/bin/freetype-config
  /opt/local/bin/gpg-error-config
  /opt/local/bin/ksba-config
  /opt/local/bin/libgcrypt-config
  /opt/local/bin/libpng-config
  /opt/local/bin/libpng16-config
  /opt/local/bin/Magick++-config
  /opt/local/bin/Magick-config
  /opt/local/bin/MagickCore-config
  /opt/local/bin/MagickWand-config
  /opt/local/bin/ncurses6-config
  /opt/local/bin/ncursesw6-config
  /opt/local/bin/pcre-config
  /opt/local/bin/pkg-config
  /opt/local/bin/python2.6-config
  /opt/local/bin/python2.7-config
  /opt/local/bin/Wand-config
  /opt/local/bin/xml2-config

それらのいくつかは imagemagick に関連しているようです。失敗したインストールが原因でしょうか? この情報は診断に役立ちますが、どうすればよいでしょうか?

2) また、次のように警告している。

Warning: You have MacPorts or Fink installed:
  /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

それはできますが、MacPorts が邪魔になって、brew を使用するたびにそれを移動して元に戻す必要があるのは永続的な問題ですか? brew と macports が互いに干渉しないように設定することはできますか?

3) これは同じ問題の症状かもしれませんが、次のような症状も発生します:

Warning: Unbrewed header files were found in /usr/local/include.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected header files:
  /usr/local/include/node/android-ifaddrs.h
  /usr/local/include/node/ares.h
  /usr/local/include/node/ares_build.h
  /usr/local/include/node/ares_rules.h
  /usr/local/include/node/ares_version.h
  // ... about 80 of these, all beginning with /usr/local/include/node

この答え「それらを削除して、homebrew から nodejs をインストールしてください」と軽々しく提案されています。これらのファイルを単に rm するのは間違っているし、危険だと思います。 それは正しいアクションでしょうか、また、port でインストールされた nodejs を brew でインストールされた nodejs に置き換える安全な手順を提案してくれる人はいますか?

関連情報