echo $ PATH与.bash_profile不匹配 [英] echo $PATH doesn't match .bash_profile
问题描述
我正在尝试在Mountain Lion上安装自制软件,以便可以安装Ruby 1.9.3.仅用PHP进行了多年编程之后,终于开始涉足Rails,Git等.无论如何,我正在使用一台赠送给我的笔记本电脑.因此,我的登录帐户不是原始帐户.我认为这可能是造成我遇到的问题的原因.
I'm attempting to install homebrew on Mountain Lion so that I can install Ruby 1.9.3. After years of programming only PHP, 'm finally taking the jump into Rails, Git, etc. In anycase, I'm on a laptop that was given to me. Therefore, my login account is not the original account. I think that might be causing the problem I'm having.
当运行冲泡医生时,我得到以下信息:
When running brew doctor I get the following:
警告:在您的路径中找不到自制的垃圾桶. 考虑修改您的PATH变量,使其包含: /usr/local/sbin
Warning: Homebrew's sbin was not found in your path. Consider amending your PATH variable so it contains: /usr/local/sbin
运行echo $ PATH时,我得到以下信息:
When running echo $PATH I get the following:
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/usr/local/git/bin:/Users/chadimoglou/.rvm/箱
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/usr/local/git/bin:/Users/chadimoglou/.rvm/bin
我的主目录中没有.profile.有一个.bash_profile.看起来像这样
There is no .profile in my home directory. There is a .bash_profile. It looks like this
[[-s"$ HOME/.rvm/scripts/rvm"]]&&来源"$ HOME/.rvm/scripts/rvm"#将RVM作为函数加载到Shell会话中
对于此终端菜鸟的任何帮助,我们深表感谢.
Any help for this terminal noob is much appreciated.
推荐答案
在您的.bash_profile中,您可以简单地执行以下操作:
in your .bash_profile, you can simply do:
export PATH="$PATH:/usr/local/sbin"
这篇关于echo $ PATH与.bash_profile不匹配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!