我看到的Brew Doctor警告是否有明显的消息来源?

时间:2015-01-09 13:35:52

标签: xcode macos homebrew osx-yosemite gfortran

我最近在安装了Xcode的Yosemite上安装了Hombrew,并希望更好地了解brew doctor警告我的内容。我知道这些警告是nothing to worry about (until they are),而不是询问如何或是否回应它们;但是我想尽我所能来了解可能的原因,以便在问题出现时做好准备(并且还要解决我办公室其他人在类似系统上遇到的问题)。

在安装了Xcode和非Brew Fortran的10.10机器上,是否存在明显来源的下列任何项目?这些物品中的任何一个响铃吗?

Warning: Some directories in /usr/local/share/man aren't writable.
This can happen if you "sudo make install" software that isn't managed
by Homebrew. If a brew tries to add locale information to one of these
directories, then the install will fail during the link step.
You should probably `chown` them:

    /usr/local/share/man/de
    /usr/local/share/man/de/man1
    /usr/local/share/man/mann

Warning: Broken symlinks were found. Remove them with `brew prune`:
  /usr/local/lib/libasan.dylib
  /usr/local/lib/libatomic.dylib
  /usr/local/lib/libcilkrts.dylib
  /usr/local/lib/libgcc_s_ppc64.1.dylib
  /usr/local/lib/libgcc_s_x86_64.1.dylib
  /usr/local/lib/libgfortran.dylib
  /usr/local/lib/libgmp.dylib
  /usr/local/lib/libgmpxx.dylib
  /usr/local/lib/libgomp.dylib
  /usr/local/lib/libitm.dylib
  /usr/local/lib/libmpc.dylib
  /usr/local/lib/libmpfr.dylib
  /usr/local/lib/libquadmath.dylib
  /usr/local/lib/libssp.dylib
  /usr/local/lib/libstdc++.dylib
  /usr/local/lib/libubsan.dylib
  /usr/local/lib/ppc64/libgfortran.2.0.0.dylib
  /usr/local/lib/ppc64/libgfortran.2.dylib
  /usr/local/lib/ppc64/libgfortran.dylib
  /usr/local/lib/x86_64/libgfortran.2.0.0.dylib
  /usr/local/lib/x86_64/libgfortran.2.dylib
  /usr/local/lib/x86_64/libgfortran.dylib

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/ImageMagick/bin/Magick++-config
  /opt/ImageMagick/bin/Magick-config
  /opt/ImageMagick/bin/MagickCore-config
  /opt/ImageMagick/bin/MagickWand-config
  /opt/ImageMagick/bin/Wand-config

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/fakemysql.h
    /usr/local/include/fakepq.h
    /usr/local/include/fakesql.h
    /usr/local/include/gmp.h
    /usr/local/include/gmpxx.h
    /usr/local/include/graphviz/arith.h
    /usr/local/include/graphviz/cdt.h
    /usr/local/include/graphviz/cgraph.h
    /usr/local/include/graphviz/color.h
    /usr/local/include/graphviz/geom.h
    /usr/local/include/graphviz/graphviz_version.h
    /usr/local/include/graphviz/gvc.h
    /usr/local/include/graphviz/gvcext.h
    /usr/local/include/graphviz/gvcjob.h
    /usr/local/include/graphviz/gvcommon.h
    /usr/local/include/graphviz/gvconfig.h
    /usr/local/include/graphviz/gvplugin.h
    /usr/local/include/graphviz/gvplugin_device.h
    /usr/local/include/graphviz/gvplugin_layout.h
    /usr/local/include/graphviz/gvplugin_loadimage.h
    /usr/local/include/graphviz/gvplugin_render.h
    /usr/local/include/graphviz/gvplugin_textlayout.h
    /usr/local/include/graphviz/gvpr.h
    /usr/local/include/graphviz/pack.h
    /usr/local/include/graphviz/pathgeom.h
    /usr/local/include/graphviz/pathplan.h
    /usr/local/include/graphviz/textspan.h
    /usr/local/include/graphviz/types.h
    /usr/local/include/graphviz/usershape.h
    /usr/local/include/graphviz/xdot.h
    /usr/local/include/itcl.h
    /usr/local/include/itcl2TclOO.h
    /usr/local/include/itclDecls.h
    /usr/local/include/itclInt.h
    /usr/local/include/itclIntDecls.h
    /usr/local/include/itclMigrate2TclCore.h
    /usr/local/include/itclTclIntStubsFcn.h
    /usr/local/include/mpc.h
    /usr/local/include/mpf2mpfr.h
    /usr/local/include/mpfr.h
    /usr/local/include/mysqlStubs.h
    /usr/local/include/odbcStubs.h
    /usr/local/include/pqStubs.h
    /usr/local/include/tcl.h
    /usr/local/include/tclDecls.h
    /usr/local/include/tclOO.h
    /usr/local/include/tclOODecls.h
    /usr/local/include/tclPlatDecls.h
    /usr/local/include/tclThread.h
    /usr/local/include/tclTomMath.h
    /usr/local/include/tclTomMathDecls.h
    /usr/local/include/tdbc.h
    /usr/local/include/tdbcDecls.h
    /usr/local/include/tdbcInt.h
    /usr/local/include/tk.h
    /usr/local/include/tkDecls.h
    /usr/local/include/tkPlatDecls.h

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

Unexpected .la files:
    /usr/local/lib/libasan.la
    /usr/local/lib/libatomic.la
    /usr/local/lib/libcilkrts.la
    /usr/local/lib/libgfortran.la
    /usr/local/lib/libgmp.la
    /usr/local/lib/libgmpxx.la
    /usr/local/lib/libgomp.la
    /usr/local/lib/libitm.la
    /usr/local/lib/libmpc.la
    /usr/local/lib/libmpfr.la
    /usr/local/lib/libquadmath.la
    /usr/local/lib/libssp.la
    /usr/local/lib/libssp_nonshared.la
    /usr/local/lib/libstdc++.la
    /usr/local/lib/libsupc++.la
    /usr/local/lib/libubsan.la

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

Unexpected .pc files:
    /usr/local/lib/pkgconfig/libcdt.pc
    /usr/local/lib/pkgconfig/libcgraph.pc
    /usr/local/lib/pkgconfig/libgvc.pc
    /usr/local/lib/pkgconfig/libgvpr.pc
    /usr/local/lib/pkgconfig/libpathplan.pc
    /usr/local/lib/pkgconfig/libxdot.pc
    /usr/local/lib/pkgconfig/tcl.pc
    /usr/local/lib/pkgconfig/tk.pc

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

Unexpected static libraries:
    /usr/local/lib/libatomic.a
    /usr/local/lib/libcilkrts.a
    /usr/local/lib/libgfortran.a
    /usr/local/lib/libgmp.a
    /usr/local/lib/libgmpxx.a
    /usr/local/lib/libgomp.a
    /usr/local/lib/libitm.a
    /usr/local/lib/libmpc.a
    /usr/local/lib/libmpfr.a
    /usr/local/lib/libquadmath.a
    /usr/local/lib/libssp.a
    /usr/local/lib/libssp_nonshared.a
    /usr/local/lib/libstdc++.a
    /usr/local/lib/libsupc++.a
    /usr/local/lib/libtclstub8.6.a
    /usr/local/lib/libtkstub8.6.a

1 个答案:

答案 0 :(得分:2)

这里有各种各样的警告,可能都有一个非常相似的原因:从源代码安装软件(通过编译configure; make; make install,或者有时解包非常具体的(例如科学的)软件包,例如fortran) 。这将主要是具有unix背景的软件,并且该软件决定在/usr/local中安装自己。

我不知道你的背景,所以我会稍微扩展(我可能会错过一些事情或者可能有一些事情(有些)不正确):

在unix& linux,一块软件经常分布在各个子目录中,而不是在一个包内(这是更多的Mac风格)。它可以包含进入/usr/local/bin/的二进制文件,包含放在/usr/local/lib/中的二进制文件所使用的例程的库,用于存放在/usr/local/include/中的函数声明的一些头文件,一个手册页放入/usr/local/man/或其他(例如配置)数据,可以进入/usr/local/share/。实际上任何组合都可以存在。

看起来有点分散,但它确实有效。它确实意味着不同软件的各个部分存在于同一个子目录中,您可以看到各种文件名列表。

请注意,/usr/local/目前是唯一的,它往往是安装额外软件的首选目录:系统(OS)可以不使用的软件。这也是Homebrew喜欢在那里安装软件的原因。其他软件管理员会避免使用/usr/local/的unix默认值并安装在/opt/local/(Macports)或/sw/(Fink)中。但Homebrew选择默认"额外"软件安装部分可能意味着它与其他已安装的软件发生冲突。

您的系统软件位于/usr//System//Library/,并且不在/usr/local/之内;如果您完全删除/usr/local/,系统仍然有效。

所以,考虑到这一点,警告:

  

警告:/ usr / local / share / man中的某些目录不可写。   如果你" sudo make install"没有管理的软件   通过Homebrew。如果brew尝试将区域设置信息添加到其中一个   目录,然后安装将在链接步骤中失败。您   应该chown他们:

/usr/local/share/man/de
/usr/local/share/man/de/man1
/usr/local/share/man/mann

其他软件在这里安装了手册页,可能是sudo命令(你可能只是有一个对话框询问你的密码; sudo然后发生在幕后。在这种情况下,那些特定目录是"拥有" by" root",而不是通常的Homebrew用户(您的登录名)。这意味着,如果遇到喜欢其手册页的软件,Homebrew在未来的事件中不能写入这些目录,因为它不归Homebrew用户所有。

您可以通过更改自己的权限来缓解此问题:

$ sudo chown -R <user>:<group> /usr/local/share/man/de
$ sudo chown -R <user>:<group> /usr/local/share/man/mann

(执行$ ls -l $HOME找到您要填写的<user><group>:它是希望明显的列。)

Warning: Broken symlinks were found. Remove them with `brew prune`:

sym(bolic)链接只是指向其他地方存在的文件的指针。如果它被破坏,原始文件就不再存在,或者符号链接指向错误的位置。您可以通过以下方式查看它所指向的内容:

ls -l   /usr/local/lib/libasan.dylib

.dylib文件都是动态库:包含函数的库文件,并且可供其他程序使用(但具体而言,未完全包含在该程序中;请参阅后面的静态库)。一个破损的库文件是一个潜在的坏事:想要使用这些文件的新软件可能会想到#啊;啊,我可以使用这个库&#34;然后在编译期间事情变得糟糕,当事实证明文件不再存在时。因此,修剪(删除)符号链接可能是明智之举。 (通常可以安全地删除符号链接,即使它正确指出:它只是一个指针,原始文件保持不变。)

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:

configure是在命令行上从源构建软件的链的一部分。它会在您的系统上查找现有库,并使用这些-config脚本请求配置程序。 Homebrew环顾四周,发现这些脚本在通常的目录之外。因此,configure可以找到相同配置脚本的多个版本,混淆使用哪个版本并使用错误的版本。

在这种情况下,它是所有ImageMagick的东西。根据您的使用方式,您可以选择删除整个/opt/ImageMagick/目录(也许您还剩下一个空的/opt/目录,在这种情况下您也可以删除/opt/目录。它不属于通常的系统。)

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.

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

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

这些都是相关的,并且与前面提到的动态库有关。 .a文件是静态库:它们(也)包含常用函数,但是当从源代码编译软件时,这些文件包含在二进制文件中(因此,二进制文件变得比动态库更大)。 .h文件是头文件,它告诉程序库文件包含什么; .la有一些关于.a库文件的额外信息。

警告告诉你,Homebrew在安装新软件时可能会感到困惑:也许它会尝试使用这些库,但它们恰好是(哦那么轻微)错误的版本而且事情不起作用。不幸的是,在你碰到它之前你不会知道。

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

pkgconfig文件类似于前面提到的那些配置脚本:如果您需要一些早期安装的软件来构建新软件,它们包含配置信息。再次,和以前一样:版本可能会略有不匹配,然后事情无法正常工作(它不会安装或崩溃,或使您的计算机通过图灵测试)。

至于如何在/usr/local.中获取所有这些文件?可能你安装了一个包,它将所有内容放在/usr/local/中。如上所述,它是放置东西的默认位置。由于它具有libgfortranlibgomp,我倾向于考虑一些科学的方案。

总而言之,大多数警告都与潜在的不兼容性有关:Homebrew与大多数软件包/软件管理器一样,试图对它的安装和周围的东西保持一定的控制(但不是太紧),因为向后兼容性等等可能意味着来自源(&#34; brewed&#34;软件)的新安装软件无法正确安装或运行。例如,Macports更严格(至少在几年前我使用它时),并将下载所需额外软件的匹配,已知兼容版本(因此,您可能最终得到四个不同版本的C编译器)

Homebrew试图对已安装的库等做一些宽容,但它确实警告你,无论是在编译期间还是以后,都会发生不好的事情。