我看到的Brew Doctor警告有明显的来源吗? [英] Are there obvious sources for the Brew Doctor warnings I'm seeing?

查看:129
本文介绍了我看到的Brew Doctor警告有明显的来源吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近在优胜美地(Yosemite)上安装了Hombrew,并安装了Xcode,想更好地了解brew doctor在警告我什么.我了解这些警告是不用担心(直到它们出现),并且我没有询问如何或是否应对它们;但是我想尽我所能,尽可能地了解可能的原因,以便在问题出现时做好准备(也可以避免办公室中其他人在类似系统上可能遇到的问题).

I have recently installed Hombrew on Yosemite with Xcode installed and would like to better understand what brew doctor is warning me about. I understand that these warnings are nothing to worry about (until they are) and am not asking how or whether to respond to them; but I would like to do the best I can to understand the likely causes so that I can be prepared when issues come up (and also to head off issues that others in my office may encounter on similar systems).

在安装了Xcode和未酿造的Fortran的10.10机器上,是否有明显的下列来源?这些物品中有没有响起的?

Are any of the items below from obvious sources on a 10.10 machine with Xcode and non-brew Fortran installed? Do any of these items ring a bell?

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

推荐答案

此处有多种警告,可能都是由非常相似的原因引起的:从源代码安装软件(通过configure; make; make install进行编译,或者有时将其解压缩)非常具体(例如科学)的软件包,例如fortran).那主要是带有UNIX背景的软件,因此该软件决定将其自身安装在/usr/local中.

There is a variety of warnings here, probably all with a very similar cause: having installed software from source (by compiling with configure; make; make install, or sometimes unpacking a very specific (e.g. scientific) package, such as fortran). That would be mostly software with a unix background, and the software decided to install itself in /usr/local.

我不知道您的背景,所以我将进行一些扩展(我可能会错过一些事情,或者可能有一些(某种程度上)不正确的事情):

I don't know your background, so I'm going to expand somewhat (I'll probably miss a few things or may have a few things (somewhat) incorrect):

在UNIX&中linux是一种软件,通常分散在各个子目录中,而不是放在一个软件包中(这是Mac风格).它可以包含进入/usr/local/bin/的二进制文件,包含放入/usr/local/lib/的二进制文件使用的例程的库,位于/usr/local/include/的函数声明的某些头文件,位于或可能进入/usr/local/share/的其他(例如配置)数据.几乎可以存在任何组合.

In unix & linux, a piece of software is often distributed across various subdirectories, and not inside a single package (which is more Mac style). It can consist of binary that goes into /usr/local/bin/, a library with routines used by the binary that is put in /usr/local/lib/, some header file for function declarations that lives in /usr/local/include/, a manual page that is put in /usr/local/man/ or additional (e.g. configuration) data that could go into /usr/local/share/. Practically any combination can exist.

看起来有点分散,但是可以用.确实,这意味着不同软件的片段位于同一子目录中,如从文件名的各种列表中可以看到的那样.

That looks a bit scattered, but it works. It does mean that pieces of different software live in the same subdirectory, as you can see form the various lists of filenames.

请注意,到目前为止,/usr/local/是唯一的,它通常是安装 extra 软件(系统(OS)可以不提供的软件)的首选目录.这也是为什么Homebrew喜欢在此处安装软件的原因.其他软件管理器避免使用/usr/local/的Unix默认设置,并安装在/opt/local/(Macports)或/sw/(Fink)中.但是Homebrew选择默认的额外"软件安装部分这一事实可能意味着它与其他已安装的软件冲突.

Note that /usr/local/ is in so far unique, that it tends to be a preferred directory to install extra software: software that the system (OS) can do without. This is also why Homebrew likes to install software there. Other software managers avoid the unix default of /usr/local/ and install in /opt/local/ (Macports) or /sw/ (Fink). But the fact that Homebrew picks the default "extra" software installation part can mean it clashes with other installed software.

您的系统软件位于普通的/usr//System//Library/中,并且不包含在/usr/local/中;如果完全删除/usr/local/,您的系统仍将正常工作.

Your system software lives in plain /usr/, or /System/ and /Library/, and stays out of /usr/local/; if you remove /usr/local/ completely, your system will still work.

因此,请牢记警告:

警告:/usr/local/share/man中的某些目录不可写. 如果您未管理"sudo make install"软件,则可能会发生这种情况 由自制.如果Brew尝试将语言环境信息添加到其中之一 目录,则安装将在链接步骤中失败.你 应该chown他们:

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

其他软件在此处安装了其手册页,可能使用sudo命令(您可能只是有一个对话框要求输入密码; sudo然后在后台进行).在那种情况下,那些特定目录是根"所有的,而不是普通的Homebrew用户(您的登录名).这意味着如果以后遇到喜欢它的手册页的软件,Homebrew就不能在这些目录中写东西,因为它不是归Homebrew用户所有.

Other software installed its manual pages here, likely with the sudo command (you may simply have had a dialog asking for your password; sudo then happened under the hood). In that case, those specific directories are "owned" by "root", and not by the usual Homebrew user (your login). That would mean Homebrew can't, in a future event, not write in those directories, if it ever comes across software that likes its manual pages there, since it's not owned by the Homebrew user.

您可以通过更改自己的权限来缓解这种情况:

You can alleviate this by changing the permissions to yourself:

$ 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>:希望这是显而易见的列.)

(do an $ ls -l $HOME to find your <user> and <group> to fill in: it's the hopefully obvious columns.)

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

sym(bolic)链接只是指向存在于其他位置的文件的指针.如果损坏,则原始文件不再存在,或者符号链接指向错误的位置.您可以通过执行以下操作查看其指向的内容:

A sym(bolic )link is just a pointer to a file that exist somewhere else. If it's broken, the original file doesn't exist anymore, or the symlink is pointing to the wrong place. You can see what it is pointing at by doing for example:

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

.dylib文件都是动态库:包含函数的库文件,并打算供其他程序使用(但是,该程序并未完全包含在该程序中;有关静态库的详细信息,请参见下文).损坏的库文件可能是一件坏事:想要使用这些文件的新软件可能会认为啊,我可以使用此库",然后在编译过程中出现问题,结果是该文件不再存在.因此,修剪(删除)符号链接可能是明智的. (即使指向正确,通常也可以安全地删除符号链接:它只是一个指针,原始文件保持不变.)

The .dylib files are all dynamic libraries: library files that contain functions, and are meant to be used by other programs (but, specifically, not fully included inside that program; see later on static libraries). A broken library file is a potentially bad thing: new software that wants to use those files may think "ah, I can use this library" and then things go bad during compilation, when it turns out the file doesn't exist anymore. So, it may be wise to prune (remove) the symbolic links. (A symbolic link can normally be safely removed, even if it points correctly: it's only a pointer, the original file is left untouched.)

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可以找到同一配置脚本的多个版本,使使用哪个版本感到困惑,并使用错误的版本.

configure is part of the chain to build software from source on the command line. It looks around on your system for existing libraries, and also ask for the configuration of programs using these -config scripts. Homebrew had a look around, and found such scripts outside the usual directories. Thus, configure could find multiple versions of the same config script, get confused which one to use and use the wrong one.

在这种情况下,所有这些都是ImageMagick的东西.根据您的使用方式,您可以选择删除整个/opt/ImageMagick/目录(然后您可能会留下一个空的/opt/目录,在这种情况下,您也可以删除/opt/;这不是通常的一部分系统).

In this case, it's all ImageMagick stuff. Depending how you use it, you could opt to remove the entire /opt/ImageMagick/ directory (and perhaps you're then left with an empty /opt/ directory, in which case you can also remove /opt/; it's not part of the usual system).

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库文件的一些其他信息.

These are all related, and related to the dynamic libraries mentioned before. The .a files are static libraries: they (also) contain often-used functions, but those files get included inside the binary when compiling software from source (thus, the binary becomes bigger than with dynamic libraries). The .h files are header files, which tell programs what the library files contain; the .la have some extra information on the .a library files.

该警告告诉您安装新软件时Homebrew可能会感到困惑:也许它将尝试使用这些库,但是它们恰好是错误的版本(哦,如此轻微),并且无法正常工作.不幸的是,直到撞上它才知道.

The warning tells you that Homebrew may get confused when installing new software: perhaps it will try to use these libraries, but they happen to be the (oh so slightly) wrong version and things don't work. You don't know until you bump into it, unfortunately.

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文件与前面提到的那些配置脚本相似:如果需要一些较早安装的软件来构建新软件,它们包含配置信息.再次,和以前一样:版本可能会略有不匹配,然后事情将无法按预期进行(它不会安装,崩溃或使您的计算机通过图灵测试).

pkgconfig files are similar to those config scripts mentioned earlier: they contain configuration information if you need some earlier installed software to build new software. Again, as before: versions may mismatch slightly and then things could not work as intended (it doesn't install, or crashes, or makes your computer pass the Turing test).

至于您如何在/usr/local.中获得所有这些文件?可能您安装了将所有内容都放入/usr/local/的软件包.如前所述,这是放置事物的默认位置.由于它具有libgfortranlibgomp的特征,因此我倾向于考虑一些科学的软件包.

As for how you may have gotten all those files in /usr/local.? Probably you installed a package that puts everything in /usr/local/ as well. As mentioned, it is a default place to put things. Since it features libgfortran and libgomp, I'm inclined to think about some scientific package.

总而言之,大多数警告是关于潜在的不兼容性的:与大多数软件包/软件经理一样,自制软件试图对安装的内容和周围环境保持一定的把握(不过不太紧),因为向后不兼容等等可能意味着源中新安装的软件(简化"软件)未正确安装或运行.例如,Macports更为严格(至少是在我几年前使用它),并且将下载所需的额外软件的匹配,已知兼容版本(因此,您最终可能会获得四个不同版本的C编译器)

All in all, most warnings are about potential incompatibilities: Homebrew, like most package/software managers, tries to hold some grip (not too tight though) on what it installs and what is around, because backwards incompatibilities and such can mean that newly installed software from source ("brewed" software) doesn't properly install or run. As an example, Macports is more strict (at least it was years ago when I used it), and will download matching, known compatible, versions of required extra software (thus, you could end up with four different versions of a C compiler).

Homebrew尝试宽容已安装的库等,但是它确实警告您在编译期间或以后可能发生不好的事情.

Homebrew tries to be lenient with respect to installed libraries and such, but it does warn you that bad things can happen, either during compilation or later on.

这篇关于我看到的Brew Doctor警告有明显的来源吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆