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

后端 未结 16 2090
予麋鹿
予麋鹿 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:58

    from the official docs https://docs.mongodb.com/manual/tutorial/install-mongodb-on-os-x/

    install homebrew and run the following commands

    sudo chown -R $(whoami) $(brew --prefix)/*

    then

    brew tap mongodb/brew

    then

    brew install mongodb-community@4.2

    and

    brew services start mongodb-community

    or

    mongod --config /usr/local/etc/mongod.conf

    then

    ps aux | grep -v grep | grep mongod

    and

    mongo

    to verify you can run show dbs in the mongo shell

提交回复
热议问题