Installation was a series of 5 simple steps:
first, install homebrew itself from command in the home page:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
After that, following instructions in this page, and changing ~/.bash_profile
to ~/.profile
as I am using Ubuntu as my wsl distro, i had to give these commands:
test -d ~/.linuxbrew && eval $(~/.linuxbrew/bin/brew shellenv)
test -d /home/linuxbrew/.linuxbrew && eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)
test -r ~/.profile && echo "eval \$($(brew --prefix)/bin/brew shellenv)" >>~/.profile
echo "eval \$($(brew --prefix)/bin/brew shellenv)" >>~/.profile
But now, when I try to run brew, I get command not found
error.
If the zsh shell that Apple provides in Mac OS X is out of date, as it has been in Yosemite and El Capitan, it's trivial to install the latest version, available on homebrew . Here's a couple of steps you need to do to make that your default. Read on, for how to do it.
Install Homebrew on Ubuntu and other Linux distributions The installation is quite easy. You just have to make sure that you have got all the dependencies.
In a wsl environment, brew is installed at location: /home/linuxbrew/.linuxbrew/
which is not part of the path.
So we simply need to add that to path, and it works. I am using zsh as my shell, so I add these lines to my ~/.zshrc
file (in ubuntu file system) :
export BREW_HOME="/home/linuxbrew/.linuxbrew/bin"
export PATH="$PATH:$BREW_HOME"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With