2013-03-05 74 views
6

当我跑啤酒医生时,我去了一大堆警告。所以我继续前进,清理了现有的安装并从头开始。布鲁克医生发出警告

现在我仍然得到一些警告:

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前几天开始,我不知道,如果提到的配置文件是相关的,或者如果我可以删除它们?已经查看了几个小时的论坛,但目前还没有明智的做法......任何建议都非常感谢!

回答

11

尝试从您的PATH中取出/opt/sm/pkg/active/bin/

这将阻止安装在该目录中的脚本无意中优先于由自制程序安装的脚本。

+6

好吧,那很简单......然'$ PATH',除了选择部分复制的一切,跑'出口PATH ='+ _pasted path_和BREW医生只是运行精细。 – 2013-03-05 14:01:50

+0

,只有在我仍然在同一个终端会话中才有效。如果我关闭然后重新打开窗口手动更新$ PATH不会持续! – tarabyte 2013-11-06 07:38:13

+0

@tarabyte - 你必须编辑你的个人资料。打开文件'〜/ .bashrc'并从PATH中删除有问题的部分。然后关闭终端并重新登录。 – StingeyB 2013-11-16 17:27:50

5

如果你是像我这样的新手,想在究竟是如何做到这一点更加明确的答案,我在这里How to change path for homebrew: "config" scripts exist outside your system or Homebrew directories找到这个答案,它的工作对我来说:

资料/ opt/SM是在/ etc/profile.d目录。通过在终端进入

CD /etc/profile.d中 然后

打开打开它。的/ opt/SM /斌:中:/ opt/SM的文本编辑器

打开sm.sh文件,然后通过将井号#在

PATH =“$ {PATH}的前注释掉路径/ pkg/active/bin:/ opt/sm/pkg/active/sbin“

将更改保存在文本编辑器中,然后退出并重新启动终端。运行酿造医生'警告'应该消失。

-1

这应该工作:

sudo rm /opt/sm/pkg/active/bin/