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).
我在周五的大部分时间里都在尝试把最新版本的Ruby安装在我的新MacBook Air上(w/ Mountain Lion安装)。
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).
我有所有最新版本的XCode和命令行工具。但我似乎不能让家酿啤酒来工作!这里是我一直被卡住的屏幕截图(我是一个新用户,所以不能嵌入这个图像)。
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!
Despite that, when I try to run "brew doctor" I received the following:
尽管如此,当我试着运行“brew doctor”时,我收到了以下信息:
-bash: brew: command not found
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! :)
同样,我正在尝试安装homebrew,因此我可以安装最新版本的ruby——我希望学习ruby代码,但如果我能运行一个开发环境,那就有点麻烦了!:)
Thanks for any help you can offer!
谢谢你的帮助!
7 个解决方案
#1
43
The warning is telling you what is wrong. The problem is that brew
is kept in /usr/local/bin
警告是告诉你什么是错的。问题是,brew保存在/usr/local/bin中。
So, you can try /usr/local/bin/brew doctor
所以,你可以试试/usr/local/bin/brew医生。
To fix it permanently alter your bash profile (.bashrc or .profile in your home directory) and add the following line:
修复它永久地改变您的bash配置文件(。在您的主目录中使用bashrc或.profile)并添加以下行:
export PATH=/usr/local/bin:$PATH
#2
14
Check XCode is installed or not.
检查XCode是否安装。
$ gcc --version
$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
$ brew doctor
$brew update.
http://techsharehub.blogspot.com/2013/08/brew-command-not-found.html "click here for exact instruction updates"
http://techsharehub.blogspot.com/2013/08/brew-command- notfound.html“点击这里获取精确的指令更新”
#3
6
nano ~/.profile
add these lines:
添加这些线:
export PATH="$HOME/.linuxbrew/bin:$PATH"
export MANPATH="$HOME/.linuxbrew/share/man:$MANPATH"
export INFOPATH="$HOME/.linuxbrew/share/info:$INFOPATH"
save the file:
保存文件:
Ctrl + X
then Y
then Enter
按Ctrl + X,然后Y进入。
then render the changes:
然后呈现变化:
source ~/.profile
源~ / . profile
#4
3
This was just happening to me, but none of the suggestions above worked. I changed directories ("cd ~/tmp") and suddenly the command
这只是发生在我身上,但上面的建议都没有奏效。我更改了目录(“cd ~/tmp”),然后突然命令。
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
ruby -e“$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)”
worked for me. Prior to changing directories I had been in a directory that is a Git repository. Perhaps that was interfering with the ruby and Git commands in the Brew install script.
为我工作。在更改目录之前,我已经在一个Git存储库的目录中。可能是在Brew安装脚本中干扰了ruby和Git命令。
#5
2
You can run in terminal
你可以在终点站跑步。
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/linuxbrew/go/install)"
ruby -e“$(curl -fsSL https://raw.githubusercontent.com/Homebrew/linuxbrew/go/install)”
then install https://github.com/robbyrussell/oh-my-zsh
.
然后安装https://github.com/robbyrussell/oh-my-zsh。
When those complate run i.e pico editor pico .zshrc
and past those lines:
当那些抱怨的时候,我。e pico编辑pico .zshrc和过去的那些线:
export PATH="$HOME/.linuxbrew/bin:$PATH"
export MANPATH="$HOME/.linuxbrew/share/man:$MANPATH"
export INFOPATH="$HOME/.linuxbrew/share/info:$INFOPATH"
remember use brew doctor
:)
记得使用brew doctor:)
#6
-1
try this
试试这个
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/linuxbrew/go/install)"
#7
-3
You can use this:
您可以使用:
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
to install homebrew.
安装自酿酒。
#1
43
The warning is telling you what is wrong. The problem is that brew
is kept in /usr/local/bin
警告是告诉你什么是错的。问题是,brew保存在/usr/local/bin中。
So, you can try /usr/local/bin/brew doctor
所以,你可以试试/usr/local/bin/brew医生。
To fix it permanently alter your bash profile (.bashrc or .profile in your home directory) and add the following line:
修复它永久地改变您的bash配置文件(。在您的主目录中使用bashrc或.profile)并添加以下行:
export PATH=/usr/local/bin:$PATH
#2
14
Check XCode is installed or not.
检查XCode是否安装。
$ gcc --version
$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
$ brew doctor
$brew update.
http://techsharehub.blogspot.com/2013/08/brew-command-not-found.html "click here for exact instruction updates"
http://techsharehub.blogspot.com/2013/08/brew-command- notfound.html“点击这里获取精确的指令更新”
#3
6
nano ~/.profile
add these lines:
添加这些线:
export PATH="$HOME/.linuxbrew/bin:$PATH"
export MANPATH="$HOME/.linuxbrew/share/man:$MANPATH"
export INFOPATH="$HOME/.linuxbrew/share/info:$INFOPATH"
save the file:
保存文件:
Ctrl + X
then Y
then Enter
按Ctrl + X,然后Y进入。
then render the changes:
然后呈现变化:
source ~/.profile
源~ / . profile
#4
3
This was just happening to me, but none of the suggestions above worked. I changed directories ("cd ~/tmp") and suddenly the command
这只是发生在我身上,但上面的建议都没有奏效。我更改了目录(“cd ~/tmp”),然后突然命令。
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
ruby -e“$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)”
worked for me. Prior to changing directories I had been in a directory that is a Git repository. Perhaps that was interfering with the ruby and Git commands in the Brew install script.
为我工作。在更改目录之前,我已经在一个Git存储库的目录中。可能是在Brew安装脚本中干扰了ruby和Git命令。
#5
2
You can run in terminal
你可以在终点站跑步。
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/linuxbrew/go/install)"
ruby -e“$(curl -fsSL https://raw.githubusercontent.com/Homebrew/linuxbrew/go/install)”
then install https://github.com/robbyrussell/oh-my-zsh
.
然后安装https://github.com/robbyrussell/oh-my-zsh。
When those complate run i.e pico editor pico .zshrc
and past those lines:
当那些抱怨的时候,我。e pico编辑pico .zshrc和过去的那些线:
export PATH="$HOME/.linuxbrew/bin:$PATH"
export MANPATH="$HOME/.linuxbrew/share/man:$MANPATH"
export INFOPATH="$HOME/.linuxbrew/share/info:$INFOPATH"
remember use brew doctor
:)
记得使用brew doctor:)
#6
-1
try this
试试这个
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/linuxbrew/go/install)"
#7
-3
You can use this:
您可以使用:
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
to install homebrew.
安装自酿酒。