Install Mongodb Catalina

Question or issue on macOS:

Mongodb

I’m relatively new to MongoDB and am trying to install MongoDB on my Mac with Homebrew, but I’m getting the following error:

I ran
brew update
Then
brew install mongodb

Today, you'll learn to install the MongoDB community edition on macOS Catalina and higher. Creating Data Folder. Before you install and use MongoDB, you need to create a data/db folder on your computer for storing MongoDB data. Before macOS Catalina, you can create this folder in the user's root directory with the following command. Copy the following two lines of code and append at the end of the file. Save the changes, press CTRL + S. Restart the terminal, or read and execute the.bashprofile file again. If the installation is successful, the following command will give the version of MongoDB just installed on your system.

How to solve this problem?

Solution no. 1:

Formula mongodb has been removed from homebrew-core. Check pr-43770 from homebrew-core


To our users: if you came here because mongodb stopped working for you, we have removed it from the Homebrew core formulas since it was migrated to a non open-source license.

Fortunately, the team of mongodb is maintaining a custom Homebrew tap. You can uninstall the old mongodb and reinstall the new one from the new tap.

Check mongodb/homebrew-brew for more info.

Solution no. 2:

first install mongoldb

Secondly install using this command. mangodb successfully installed

You will get the output

Solution no. 3:

Try this code in your terminal:

And then:

Finally:

Solution no. 4:

In MacOs Catalina doesn’t work properly for me.

After the installation (https://zellwk.com/blog/install-mongodb/) i had to add permission to “/tmp/mongodb-27017.sock”

and the command “mongod” seems to ignore the config file (mongod.conf) in “/usr/local/etc” so i have to always launch it with the dbpath argument

Install Mongodb Mac Catalina

even if the same path is specified in the config file.

Install

Also using “mongod” with configuration file doesn’t work for me

or

I solved all these issues starting the mongodb via brew services. That worked well without issues and takes the parameters from the right configuration file.

Install Mongodb Catalina Operating System

Hope this helps!