【问题标题】:Cannot install mongoDB on macOS High Sierra?无法在 macOS High Sierra 上安装 mongoDB?
【发布时间】:2020-03-20 02:23:50
【问题描述】:

我运行命令brew tap mongodb/brew 没有问题,但是当我运行brew install mongodb-community 时收到以下错误。

错误:

==> Installing mongodb-community from mongodb/brew
Error: An exception occurred within a child process:
  Errno::EACCES: Permission denied @ dir_s_mkdir - /Users/shilpakancharla/Library/Logs/Homebrew

我该如何克服这个问题?提前致谢。

【问题讨论】:

    标签: mongodb macos homebrew macos-high-sierra


    【解决方案1】:

    这将解决您的 Homebrew 权限问题。

    sudo chown -R "$USER":admin /Users/$USER/Library
    sudo chown -R "$USER":admin /usr/local
    

    【讨论】:

    • 我仍然遇到一些问题 - 在 High Sierra 中,您似乎无法在 /usr/local (github.com/Homebrew/brew/issues/3228) 上使用 chown。我使用了sudo chown -R $(whoami) $(brew --prefix)/*,但没有运气。我仍然无法安装 mongoDB。
    • 主要是权限问题。你能跑sudo chown -R "$USER":admin /Users/$USER/Library吗,还更新了我原来的答案。
    • 我运行了该命令,然后运行了您在原始评论中列出的第二个命令并收到了chown: /usr/local: Operation not permitted。想知道这是否与 High Sierra 有关?
    • 这也可能是相关的。 discourse.brew.sh/t/problem-with-brew-update/5614/6你能运行brew config并更新原帖吗?
    • 所以好像我在尝试别的东西,我卸载了自制软件。现在,我无法再次安装它并不断收到此错误Need sudo access on macOS! sudo: /etc/sudoers is owned by uid 501, should be 0 sudo: no valid sudoers sources found, quitting sudo: unable to initialize policy plugin 来回抱歉。你能帮我解决这个问题吗?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-08-13
    • 2018-12-05
    • 2018-07-20
    • 2018-06-11
    • 2018-01-27
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多