Today I will introduce how to install MndogDB through brew in mac system, as well as the problems encountered and perfect solutions.
1. Whether brew is installed on mac: brew -v
The following message appears, indicating that brew has been installed
2. Direct installation: brew install mongodb
It is possible that the installation will be successful directly at this step, but the above information clearly indicates an error:Error: No available formula with the name "mongodb"
3. Solve the error: brew tap mongodb/brew
4. Continue installation (community version): brew install mongodb-community
Then I found out and continued to report errors...
5. Solve the error: brew install gcc
Um...it's still an error, so let's continue to solve it...
6. Continue to solve the error: xcode-select --install
7. Final installation: brew install [email protected] (the latest community version on the official website)
8. Verify whether the installation is successful: mongod --version
Ok, the following message appears, indicating that the installation is successful and you can use the powerful mongodb normally~~
Reference: https://docs.mongodb.com/master/tutorial/install-mongodb-on-os-x/