Read-only file system when attempting mkdir /data/db on Mac

后端 未结 16 2107
予麋鹿
予麋鹿 2020-12-07 10:28

I am trying to create a new folder in the main directory

Tried all kinds of examples

sudo mkdir /data/db

sudo mkdir -p /data/db<

16条回答
  •  日久生厌
    2020-12-07 10:50

    Mac version Catalina made the root folder is no longer writable.

    Brew has an updated version of mongodb to use a new path (which it creates itself), /usr/local/var/mongodb and following these instructions will fix the issue:

    Guide to installing updated mongodb-community-edition

    brew install mongodb-community@VERSION where the first VERSION with the fix is 4.2

提交回复
热议问题