为什么酿酒医生在mdfind上停滞不前?

Jam*_*bri 12 homebrew osx-mountain-lion

问题

我一直有自制问题,所以我想我会跑brew doctor,但它只是停留在mdfind上.brew --config输出以下内容后,还会挂起mdfind:

HOMEBREW_VERSION: 0.9.4
ORIGIN: https://github.com/mxcl/homebrew
HEAD: c2cc58163b54a9ea2ee56febfc722396079c5b9a
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: quad-core 64-bit sandybridge
OS X: 10.8.3-x86_64
Xcode: 4.6.2
CLT: 4.6.0.0.1.1365549073
LLVM-GCC: build 2336
Clang: 4.2 build 425
Run Code Online (Sandbox Code Playgroud)

brew update 似乎工作:

$ brew update
Already up-to-date.
Run Code Online (Sandbox Code Playgroud)

我甚至可以安装东西:

$ brew install rsnapshot
==> Downloading http://rsnapshot.org/downloads/rsnapshot-1.3.1.tar.gz
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/rsnapshot/1.3.1 --mandir=/usr/local/C
==> make install
  /usr/local/Cellar/rsnapshot/1.3.1: 12 files, 356K, built in 4 seconds
Run Code Online (Sandbox Code Playgroud)

他们甚至工作:

$ rsnapshot
rsnapshot 1.3.1
Usage: rsnapshot [-vtxqVD] [-c cfgfile] [command] [args]
Type "rsnapshot help" or "man rsnapshot" for more information.  
Run Code Online (Sandbox Code Playgroud)

我试过的

  • 卸载所有包
  • 解开所有桶
  • 重新安装自制软件
  • 重新安装XCode +命令行工具
  • 安装XQuartz(我必须通过命令行执行)
  • 使用Spotlight重新索引我的系统驱动器
  • 重置xcode-select路径
  • 删除 /usr/share/xcode-select/

解决方法

运行后brew doctor,如果我终止mdfind进程两次(一个实例在另一个实例终止后生成),我终于得到了一个成功的返回:

$ brew doctor
Your system is ready to brew.
Run Code Online (Sandbox Code Playgroud)

与配置相同:

$ brew --config
OMEBREW_VERSION: 0.9.4
ORIGIN: https://github.com/mxcl/homebrew
HEAD: c2cc58163b54a9ea2ee56febfc722396079c5b9a
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: quad-core 64-bit sandybridge
OS X: 10.8.3-x86_64
Xcode: 4.6.2
CLT: 4.6.0.0.1.1365549073
LLVM-GCC: build 2336
Clang: 4.2 build 425
X11: 2.7.4 => /opt/X11
System Ruby: 1.8.7-358
Perl: /usr/bin/perl
Python: /usr/bin/python
Ruby: /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
Run Code Online (Sandbox Code Playgroud)

注意在通常的停顿点之后,配置中的下一个项目是X11.

更多信息

我最近不得不从我的系统中删除手动编译的ICU版本,并且我实际上删除了一些未由ICU安装的二进制文件的可能性很小.我不确定,但我想我会提到它以防万一.即使让我听起来确实非常愚蠢.

brew doctor 终止时没有输出.

brew doctor似乎check_for_latest_xquartz特别停在支票上,我已检查过:

$ brew doctor check_for_latest_xquartz
Run Code Online (Sandbox Code Playgroud)

我的xcode-select道路似乎正确:

$ xcode-select --print-path
/Applications/Xcode.app/Contents/Developer
Run Code Online (Sandbox Code Playgroud)

mdfind 可以找到XQuartz:

$ mdfind "kMDItemCFBundleIdentifier == 'org.macosforge.xquartz.X11'"
/Applications/Utilities/XQuartz.app
Run Code Online (Sandbox Code Playgroud)

......但它仍然没有回归.

相关链接

Wil*_*ill -1

你的 GitHub 链接中的最后一篇文章似乎回答了这个问题:

这是迄今为止关于这个非常令人沮丧的主题的最有用的线程。我尝试了上面的所有内容,发现 brew doctor 仍然存在:

check_for_autoconf (kill mdfind 2x)
check_for_latest_xquartz (kill mdfind 2x)
check_for_linked_keg_only_brews (kill mdfind 4x)
check_for_osx_gcc_installer (kill mdfind 2x)
check_for_stray_developer_directory (kill mdfind 2x)
check_missing_deps (kill mdfind 2x)
check_standard_compilers (kill mdfind 1x)
Note that killing mdfind multiple times at least allows brew doctor to continue but that is not a solution.
Run Code Online (Sandbox Code Playgroud)

当brew doctor最终完成时,我注意到一个警告:

check_user_path_2
Warning: Homebrew's bin was not found in your PATH.
Consider setting the PATH for example like so
    echo export PATH='/usr/local/bin:$PATH' >> ~/.bash_profile
Run Code Online (Sandbox Code Playgroud)

这添加了导出PATH=/usr/local/bin:$PATH~/.bash_profile. 这也在开头~/.bash_profile和结尾两次,所以我删除了除最后一条之外的所有内容。打开一个新的终端窗口,现在/usr/local/bin位于我的路径的开头而不是中间。

现在,brew doctor 运行时不会挂起!

如果这不能解决问题,我建议在 GitHub 上对此线程做出贡献或在 GitHub 上打开一个新问题,因为这可能是自制程序中的错误。