我正在尝试在 Mountain Lion 上安装 Homebrew 软件,以便我可以安装 Ruby 1.9.3。经过多年的 PHP 编程,我终于开始使用 Rails、Git 等。无论如何,我使用的是别人给我的笔记本电脑。因此,我的登录帐户不是原始帐户。我认为这可能会导致我遇到的问题。
运行 brew doctor 时,我得到以下信息:
Warning: Homebrew's sbin was not found in your path. Consider amending your PATH variable so it contains: /usr/local/sbin
运行 echo $PATH 时,我得到以下信息:
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/usr/local/git/bin:/Users/chadimoglou/.rvm/bin
我的主目录中没有 .profile。有一个 .bash_profile。看起来像这样
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session as a function
非常感谢对这个终端菜鸟的任何帮助。
最佳答案
在您的 .bash_profile 中,您可以简单地执行以下操作:
export PATH="$PATH:/usr/local/sbin"
关于ruby-on-rails - echo $PATH 不匹配 .bash_profile,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14175773/