安装包含5个简单步骤:
首先,从主页的命令中安装homebrew本身:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
在那之后,按照这个页面的说明,将~/.bash_profile
更改为~/.profile
,因为我使用的是Ubuntu作为我的wsl发行版,我不得不执行以下命令:
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
但是现在,当我尝试运行brew时,会出现command not found
错误。