zoukankan      html  css  js  c++  java
  • Brew Install MongoDB. Permission Denied

      

    ➜ 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/var

    因为是权限的问题,之后brew又自己选择了进行git clone源码,然后编译,其实是没有什么用的,因为/usr/local的权限是没有的。

    解决办法:

    brew update

    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.

    You should probably change the ownership and permissions of /usr/local
    back to your user account.
    sudo chown -R $(whoami):admin /usr/local

     所以只要 sudo chown -R $(whoami):admin /usr/local

    就可以解决了

  • 相关阅读:
    php array function
    scrum敏捷开发重点介绍
    PHP文件操作
    正则
    PHP面向对象
    PHP数组
    PHP函数参数
    PHP运算符优先级
    PHP判断变量类型和类型转换的三种方式
    PHP变量的传值和引用
  • 原文地址:https://www.cnblogs.com/-Doraemon/p/4913199.html
Copyright © 2011-2022 走看看