Installation 如何更改自制程序的路径:“;配置";脚本存在于系统或自制目录之外

Installation 如何更改自制程序的路径:“;配置";脚本存在于系统或自制目录之外,installation,homebrew,Installation,Homebrew,目标:安装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 a

目标:安装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
我在这里找到了答案:但我不知道怎么做,因为他没有告诉我们怎么做

我需要从路径中删除/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_配置文件;打开~/.bash_配置文件

我得到:

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*

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

看来“sm”来自于,至少在我的情况下是这样。按照中的方法,我注释掉了
/etc/profile.d/sm.sh中的行,并重新启动了终端。这解决了上述
brew doctor
错误。
/opt/sm
位于
/etc/profile.d
目录中。通过输入打开它

cd /etc/profile.d
在终点站,然后

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


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

你知道“sm”是什么吗?不,我不知道。什么是sm?它是安装它的地方:
/opt/sm
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"