安装:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
可参考官网:
https://brew.sh/
使用
brew list nginx # 来显示路径
brew info ngnix # 查看nginx安装是安装文件
报错:
-bash: brew: command not found
解决办法:
终端输入
sudo vim .bash_profile
输入i进入输入模式, 添加
export PATH="/usr/local/bin:$PATH"
按esc键退出输入模式, 输入:wq退出并保存, 最后输入使配置生效
source .bash_profile
报错:
brew `require': cannot load such file
解决办法
重新安装Homebrew