【问题标题】:Brew doctor gives out warningsBrew医生发出警告
【发布时间】:2013-03-05 13:43:22
【问题描述】:

当我运行 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/sm/pkg/active/bin/curl-config
    /opt/sm/pkg/active/bin/ncurses5-config
    /opt/sm/pkg/active/bin/ncursesw5-config
    /opt/sm/pkg/active/bin/pkg-config
    /opt/sm/pkg/active/bin/xml2-config
    /opt/sm/pkg/active/bin/xslt-config
Warning: You have a non-Homebrew 'pkg-config' in your PATH:
  /opt/sm/pkg/active/bin/pkg-config

`./configure` may have problems finding brew-installed packages using
this other pkg-config.

但由于我几天前才开始使用 OS X,我不确定上述配置文件是否相关,或者我是否可以删除它们?已经浏览了几个小时的论坛,但目前仍然没有更明智的...任何建议都非常感谢!

【问题讨论】:

    标签: homebrew


    【解决方案1】:

    尝试将/opt/sm/pkg/active/bin/ 排除在您的路径之外。

    这将防止安装在该目录中的脚本意外地优先于自制软件安装的脚本。

    【讨论】:

    • 好吧,这很简单... Ran $PATH ,复制了除 opt-part 之外的所有内容,运行 export PATH=+ pasted path 并且 brew doctor 运行良好。
    • 只有在我留在同一个终端会话中时才对我有用。如果我关闭然后重新打开窗口,手动更新的 $PATH 不会持续存在!
    • @tarabyte - 你必须编辑你的个人资料。打开文件 ~/.bashrc 并从 PATH 中删除有问题的部分。然后关闭您的终端并重新登录。
    【解决方案2】:

    如果您是像我这样的新手,并且想要更清楚地了解如何执行此操作,我在 How to change path for homebrew: "config" scripts exist outside your system or Homebrew directories 找到了这个答案,它对我有用:

    /opt/sm 位于 /etc/profile.d 目录中。输入打开它

    cd /etc/profile.d 在终端,然后

    打开。

    在文本编辑器中打开 sm.sh 文件,然后通过在前面添加井号 # 来注释掉路径

    PATH="${PATH}:/opt/sm/bin:/opt/sm/pkg/active/bin:/opt/sm/pkg/active/sbin"

    在您的文本编辑器中保存更改,然后退出并重新启动终端。运行 brew doctor 'Warning' 应该消失了。

    【讨论】:

      猜你喜欢
      • 2015-06-13
      • 1970-01-01
      • 2013-08-14
      • 2014-12-11
      • 2011-06-02
      • 2014-03-11
      • 1970-01-01
      • 2023-03-10
      • 2017-02-07
      相关资源
      最近更新 更多