➜ models git:(master) brew install mongodb
==> Downloading https://homebrew.bintray.com/bottles/mongodb-3.0.7.el_capitan.bo
Already downloaded: /Library/Caches/Homebrew/mongodb-3.0.7.el_capitan.bottle.tar.gz
==> Pouring mongodb-3.0.7.el_capitan.bottle.tar.gz
Error: Permission denied - /usr/local/vargit
由于是权限的问题,以后brew又本身选择了进行git clone源码,而后编译,实际上是没有什么用的,由于/usr/local的权限是没有的。mongodb
解决办法:api
brew updatethis
Error: The /usr/local directory is not writable.
Even if this directory was writable when you installed Homebrew, other
software may change permissions on this directory. Some versions of the
"InstantOn" component of Airfoil are known to do this.component
You should probably change the ownership and permissions of /usr/local
back to your user account.
sudo chown -R $(whoami):admin /usr/localhomebrew
因此只要 sudo chown -R $(whoami):admin /usr/localip
就能够解决了源码