如何修改 Homebrew 的 PATH? [英] How to modify PATH for Homebrew?

查看:34
本文介绍了如何修改 Homebrew 的 PATH?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试安装 ruby​​ 1.9.3,读到我需要先安装自制软件.Ran brew doctor,它给了我一堆警告.其中之一是:

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 在你的路径中.

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆