1
Error: No such file or directory - /usr/local/var/homebrew/linked/mongodb-community

I am trying to install MongoDB community but I keep getting this error where it gives me an error saying I don't have a directory named mongodb-community when such a directory already exists.

1 Answers1

0

Just in case someone else ran into the same problem:

Solution i: sudo brew services start mongodb-community

Solution ii: cd Desktop mkdir dbs cd dbs mongod --dbpath .

  • 1
    These two solutions are quite different! When you start the mongodb service then it reads the configuration file, typically `/etc/mongod.conf` (for Linux). The second one does not read any config file. Thus, the behavior can be very different. See https://stackoverflow.com/questions/12738322/what-is-the-default-database-path-for-mongodb/67043090#67043090 – Wernfried Domscheit Dec 05 '21 at 18:22