2013-03-05 150 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/