Install Homebrew in a Mac

26,709

1-First, install Homebrew.

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

2-Then run brew update to make sure Homebrew is up to date.

brew update

3-As a safe measure you should run brew doctor to make sure your system is ready to brew. Run the command below and follow any recommendations from brew doctor.

brew doctor

4-Next, add Homebrew's location to your $PATH in your .bash_profile or .zshrc file.

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

5-Next, install Node (npm will be installed with Node):

brew install node

6-To test out your Node and npm install, try installing Grunt (you might be asked to run with sudo):

npm install -g grunt-cli
Share:
26,709
Nunyet de Can Calçada
Author by

Nunyet de Can Calçada

no puedor, pecador de la pradera ! Ese peasso de Nullpointer que sale de la pantalla y me dise: Quietoooooor, que esto peta mas que una escopeta de feria, por la Gloria de mi Madre !!!! no puedo, no puedo, no puedo Ese peasso de Scrum ceremonias !!!! y que has hechor ? y que haras ??? y que hacees ?? y yo que sé, for my Mother's glory !!!!!!!! 7 Nullpointers que vienen de Bonaaansaaaa

Updated on July 09, 2022

Comments

  • Nunyet de Can Calçada
    Nunyet de Can Calçada almost 2 years

    I am trying to install Homebrew in a Mac v 10.12.2 using

    brew install node
    

    But I got these errors:

    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- mach (LoadError)
        from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /usr/local/Library/Homebrew/extend/pathname.rb:2:in `<top (required)>'
        from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /usr/local/Library/Homebrew/global.rb:3:in `<top (required)>'
        from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /usr/local/Library/brew.rb:15:in `<main>'
    
  • Ashwani Garg
    Ashwani Garg over 3 years
    Solved my problem, and saved many hours frustration.
  • Mbuodile Obiosio
    Mbuodile Obiosio over 3 years
    Thank you for sharing this. Solved my problem after several hours of trying.