Error Installing Homebrew - Brew Command Not Found

后端 未结 7 1136
孤独总比滥情好
孤独总比滥情好 2020-12-24 11:51

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).

I have all the latest versio

相关标签:
7条回答
  • 2020-12-24 12:30

    try this

    ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/linuxbrew/go/install)"
    
    0 讨论(0)
  • 2020-12-24 12:33

    This was just happening to me, but none of the suggestions above worked. I changed directories ("cd ~/tmp") and suddenly the command

    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.

    0 讨论(0)
  • 2020-12-24 12:33

    You can use this:

    ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)" 
    

    to install homebrew.

    0 讨论(0)
  • 2020-12-24 12:34

    Check XCode is installed or not.

    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"

    0 讨论(0)
  • 2020-12-24 12:35
    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

    then render the changes:

    source ~/.profile

    0 讨论(0)
  • 2020-12-24 12:40

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

    So, you can try /usr/local/bin/brew doctor

    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
    
    0 讨论(0)
提交回复
热议问题