如何修改Homebrew的PATH? [英] How to modify PATH for Homebrew?
问题描述
尝试安装ruby 1.9.3,请阅读我需要先安装自制软件.冲泡啤酒的医生,这给了我很多警告.其中之一是:
Trying to install ruby 1.9.3, read that I need to install homebrew first. Ran brew doctor, and it's giving me a bunch of warnings. One of which is:
警告:/usr/bin出现在/usr/local/bin之前 将使用系统提供的程序代替由 自制酒.两种路径中都存在以下工具:
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:
easy_install
easy_install-2.6
请考虑修改您的PATH,以便/usr/local/bin位于前面 /usr/bin在您的PATH中.
Consider amending your PATH so that /usr/local/bin is ahead of /usr/bin in your PATH.
一个人如何处理这里的要求?
How does one do what it's asking here?
推荐答案
打开/etc/paths文件,将/usr/local/bin放在/usr/bin顶部
open your /etc/paths file, put /usr/local/bin on top of /usr/bin
$ sudo vi /etc/paths
/usr/local/bin
/usr/local/sbin
/usr/bin
/bin
/usr/sbin
/sbin
和重启终端,@ mmel
这篇关于如何修改Homebrew的PATH?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!