/ usr / local / bin之前的homebrew / usr / bin

时间:2014-06-15 01:27:41

标签: homebrew brew-doctor

任何人都知道如何解决这个问题。我几乎在这里尝试一切。

我在这里输入brew医生后出现错误

Warning: /usr/bin occurs before /usr/local/bin
This means that system-provided programs will be used instead of those
provided by Homebrew. The following tools exist at both paths:

phar
phar.phar
php
php-config
phpize

Consider setting your PATH so that /usr/local/bin
occurs before /usr/bin. Here is a one-liner:
echo export PATH='/usr/local/bin:$PATH' >> ~/.bash_profile

在这里我的〜/ .bash_profile

[[ -s "$HOME/.profile" ]] && source "$HOME/.profile" # Load the default .profile

[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
echo $PATH /usr/local/bin:/usr/local/sbin:/Users/ericsonluciano/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
export PATH=/usr/local/bin:/Users/ericsonluciano/.rvm/gems/ruby-2.1.2@rails4.1/bin:/Users/ericsonluciano/.rvm/gems/ruby-2.1.2@global/bin:/Users/ericsonluciano/.rvm/rubies/ruby-2.1.2/bin:/usr/bin:/bin$
export PATH=/usr/local/bin:$PATH

感谢大家的帮助:)

1 个答案:

答案 0 :(得分:1)

正确的做法是在由非交互式shell和交互式shell发起的配置文件中进行任何路径设置。

很可能你的˜/.bashrc代码(仅用于互动设置)与你的路径混在一起。

请参阅此回答https://stackoverflow.com/a/27191389/766289,然后使用bash代替zsh