MongoDB Community Edition can't install on Macbook


I followed the steps in the documentation of Mongo here;

I use Macbook Air 2017 (Intel).

However, somehow I cannot run the commands like “mongo” or “mongod” successfully.

Can you please help me on this?

Hello @Samed_Torun and welcome to the MongoDB Community forums. :wave:

The line after what you have highlighted says Address already in use. This means that there is a process alreadly listening on port 27017. Most likely this is another instance of mongod.

mongod is the process that runs the database and you can only have a single instance of the process running at a time, unless you specify different --port options for the other servers.

We can also tell from your screenshot that you are running MongoDB 6.0. This version no longer ships the mongo executable. This is the older version of the shell and it has been replaced by the mongosh executable which should have been installed on your Mac. If not you can download it separately. Almost anything you can do in the older mongo tool you can do in the newer mongosh. However, most people are not going to notice any difference between the two and you will likely not run across any of the functionality that is missing.


This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.