macOS安装openViPN终端提示bash: brew: command not found

最近需要安装openViPN,当执行安装的时候,出现了问题,具体流程如下

1.打开终端安装openViPN

$ brew install openvpn

执行半截提示-bash: brew: command not found,顾名思义,未安装HomeBrew(homebrew官网在这里

2.安装homebrew

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

中途需要配合press enter按键继续执行安装;接着便出现了

  • Downloading and installing Homebrew...
  • /usr/local/Homebrew/.git: Permission denied
  • 顾名思义,是安装的时候权限不允许

3.给文件夹增加权限

$ sudo chgrp -R admin /usr/local 
$ sudo chmod -R g+w /usr/local

接着输入密码继续执行,当安装完毕后,检查homebrew是否安装成功

$ brew --version

输出

Homebrew 2.1.10
Homebrew/homebrew-core (git revision 8738; last commit 2019-08-21)

至此安装成功!

相关文章

最近做自动化测试时,深感自己对前端涉猎太少,加上对这块比...
homebrew本身就是一个git仓库。使用homebrew安装软件包时,会...
一、Homebrew安装、卸载等命令Homebrew的安装和卸载都非常简...
在mac系统中,使用homebrew可以很方便的管理包。按照官网的说...
我按照说明从这里使用brew安装mysqlhttps://gist.github.com...
我在macOS10.12.4上安装了nginx1.10.3和php5.5.38作为开发服...