安装 Homebrew 时出错 - 未找到 Brew 命令 [英] Error Installing Homebrew - Brew Command Not Found

查看:40
本文介绍了安装 Homebrew 时出错 - 未找到 Brew 命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我星期五的大部分时间都在尝试在我的新 MacBook Air(安装了 Mountain Lion)上安装最新版本的 Ruby.

I've spent the bulk of my Friday trying to get the latest version of Ruby installed on my new MacBook Air (w/ Mountain Lion installed).

我拥有所有最新版本的 XCode 和命令行工具.但我似乎无法让 Homebrew 工作!这是我一直卡在那里的截图(我是新用户,所以不能嵌入这张图片).

I have all the latest versions of XCode and command line tools. But I can't seem to get Homebrew to work! Here's a screenshot of where I keep getting stuck (I'm a new user, so can't embed this image).

如您所见,我使用以下内容来安装 Homebrew:

As you can see I used the following to instal Homebrew:

ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go/install)"

虽然有一个警告",但似乎安装成功了:

While there was a "warning" it seemed as though the installation worked:

Warning: /usr/local/bin is not in your PATH.
==> Installation successful!

尽管如此,当我尝试运行brew doctor"时,我收到了以下信息:

Despite that, when I try to run "brew doctor" I received the following:

-bash: brew: command not found

再说一次,我正在尝试安装自制软件,所以我可以安装最新版本的 ruby​​——我想学习用 ruby​​ 编写代码,但是如果我什至可以运行开发环境,那就有点搞砸了!:)

Again, I'm trying to install homebrew, so i can instal the latest version of ruby -- I'm looking to learn to code in ruby, but kind of screwed if I can even get a development environment running! :)

推荐答案

警告告诉您出了什么问题.问题是 brew 保存在 /usr/local/bin

The warning is telling you what is wrong. The problem is that brew is kept in /usr/local/bin

所以,你可以试试/usr/local/bin/brew doctor

要永久修复它,请更改您的 bash 配置文件(主目录中的 .bashrc 或 .profile)并添加以下行:

To fix it permanently alter your bash profile (.bashrc or .profile in your home directory) and add the following line:

export PATH=/usr/local/bin:$PATH

这篇关于安装 Homebrew 时出错 - 未找到 Brew 命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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