gpt4 book ai didi

osx-mountain-lion - 为什么 brew doctor 在 mdfind 上拖延?

转载 作者:行者123 更新时间:2023-12-04 01:15:29 26 4
gpt4 key购买 nike

问题

我一直有 Homebrew 软件的问题,所以我想我应该运行 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
brew update似乎工作:
$ brew update
Already up-to-date.

我什至可以安装东西:
$ 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

他们甚至可以工作:
$ rsnapshot
rsnapshot 1.3.1
Usage: rsnapshot [-vtxqVD] [-c cfgfile] [command] [args]
Type "rsnapshot help" or "man rsnapshot" for more information.

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

  • 解决方法

    运行后 brew doctor , 如果我两次终止 mdfind 进程(一个实例在另一个终止后产生),我最终会得到一个成功的返回:
    $ brew doctor
    Your system is ready to brew.

    同样处理配置:
    $ 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

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

    更多信息

    我最近不得不从我的系统中删除手动编译的 ICU 版本,而且我实际上删除了一些 ICU 未安装的二进制文件的可能性很小。我不确定,但我想我会提到它以防万一。即使确实让我听起来很傻。
    brew doctor终止时没有输出。
    brew doctor似乎在 check_for_latest_xquartz 上拖延了特别检查,我已经检查过:
    $ brew doctor check_for_latest_xquartz

    我的 xcode-select路径似乎正确:
    $ xcode-select --print-path
    /Applications/Xcode.app/Contents/Developer
    mdfind可以找到XQuartz:
    $ mdfind "kMDItemCFBundleIdentifier == 'org.macosforge.xquartz.X11'"
    /Applications/Utilities/XQuartz.app

    ......但它仍然没有返回。

    相关链接
  • brew doctor and brew upgrade stopped working
  • brew doctor hangs at mdfind - 类似/相同的问题。用户没有说明如何修复它。
  • brew doctor not terminating
  • Unable to run brew --config, doctor, audit.
  • 最佳答案

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

    This is by far the most useful thread on this very frustrating topic. I tried everything above and found that brew doctor hung on:

    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.

    When brew doctor finally completed, I noticed one warning:

    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

    This added export PATH=/usr/local/bin:$PATH to ~/.bash_profile. This was also at the beginning of ~/.bash_profile and twice at the end so I deleted all but the last statement. Opening a new terminal window, now /usr/local/bin is at the beginning of my path instead of in the middle.

    Now brew doctor runs without hanging!



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

    关于osx-mountain-lion - 为什么 brew doctor 在 mdfind 上拖延?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16546722/

    26 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com