2

目标:安装 Ruby 2.0.0

酿酒医生 说:

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

我在这里找到了答案:Brew 医生发出警告 但不知道怎么做,因为他没有告诉我们该怎么做

我需要从我的路径中删除 /opt/sm/pkg/active/bin/。

$ echo $PATH 
/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/sm/bin:/opt/sm/pkg/active/bin:/opt/sm/pkg/active/sbin:/Development/android-sdk-macosx/platform-tools:/Development/android-sdk-macosx/tools

但是当我打开我的文件时,触摸 ~/.bash_profile; 打开 ~/.bash_profile

我得到:

export PATH=${PATH}:/Development/android-sdk-macosx/platform-tools:/Development/android-sdk-macosx/tools
##
# Your previous /Users/john/.bash_profile file was backed up as     /Users/john/.bash_profile.macports-saved_2013-06-06_at_14:30:25
##

# MacPorts Installer addition on 2013-06-06_at_14:30:25: adding an appropriate PATH     variable for use with MacPorts.
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
# Finished adapting your PATH environment variable for use with MacPorts.


[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*

请注意,我要删除的路径不在文件中,但在我的路径中。我该怎么办??

4

2 回答 2

3

/opt/sm是在目录/etc/profile.d中。通过输入打开它

cd /etc/profile.d

在终端,然后

 open .

在文本编辑器中打开 sm.sh 文件,然后更改

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

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

然后退出并重新启动终端。运行brew doctor“警告”应该消失了。

于 2013-08-27T13:14:08.637 回答
0

It seems that "sm" comes from RailsInstaller, at least in my case. Following the approach in this post, I commented out the line in /etc/profile.d/sm.sh and restarted Terminal. This solved the above brew doctor errors.

于 2013-08-23T06:18:08.447 回答