![Brew 构建失败,如何修复 brew 这些医生报告的问题?](https://linux22.com/image/1533433/Brew%20%E6%9E%84%E5%BB%BA%E5%A4%B1%E8%B4%A5%EF%BC%8C%E5%A6%82%E4%BD%95%E4%BF%AE%E5%A4%8D%20brew%20%E8%BF%99%E4%BA%9B%E5%8C%BB%E7%94%9F%E6%8A%A5%E5%91%8A%E7%9A%84%E9%97%AE%E9%A2%98%EF%BC%9F.png)
我希望我是程序员,但我却是管理员。我想用 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 这些文件听起来是错误的和危险的。 这是正确的操作吗?有人可以建议一个安全的程序来用 brew 安装的 nodejs 替换 port 安装的 nodejs 吗?